im_change

This commit is contained in:
陈浩 2025-04-25 18:20:19 +08:00
parent bd9f1c41df
commit 571a97a6f4
64 changed files with 1629 additions and 581 deletions

View File

@ -301,6 +301,7 @@ const onContactInfoEmitSubmit = (item: any) => {
}; };
const onContactInfoButtonClicked = (item: any) => { const onContactInfoButtonClicked = (item: any) => {
item.onClick item.onClick
&& item.onClick({ && item.onClick({
contactInfoData: contactInfoData.value, contactInfoData: contactInfoData.value,
@ -396,6 +397,7 @@ function onUserBlacklistUpdated(userBlacklist: IBlackListUserItem[]) {
} }
async function onCurrentContactInfoUpdated(contactInfo: IContactInfoType) { async function onCurrentContactInfoUpdated(contactInfo: IContactInfoType) {
console.log('contactInfo-----', contactInfo);
if ( if (
contactInfoData.value contactInfoData.value
&& contactInfo && contactInfo

View File

@ -0,0 +1,128 @@
.tui-contact-info-h5 {
padding: 0;
overflow: hidden;
}
.tui-contact-info-h5-header {
background-color: #fff;
padding: 10px !important;
display: flex;
flex-direction: row;
}
.tui-contact-info-h5-header-title {
flex: 1;
text-align: center;
font-weight: 500;
font-size: 14px;
margin-right: 30px;
}
.tui-contact-info-h5-basic {
padding: 10px !important;
background: #fff;
margin-top: 10px !important;
display: flex;
flex-direction: row-reverse;
justify-content: left;
border-bottom: none;
}
.tui-contact-info-h5-basic-text-name {
font-size: 20px;
padding-bottom: 1px;
}
.tui-contact-info-h5-basic-text-other {
font-size: 14px;
padding: 3px 0;
}
.tui-contact-info-h5-basic-avatar {
border-radius: 10px;
margin-right: 10px;
}
.tui-contact-info-h5-more {
background: #fff;
margin-top: 10px !important;
overflow: hidden;
padding: 0;
}
.tui-contact-info-h5-more-item {
width: 100%;
box-sizing: border-box;
overflow: hidden;
padding: 10px !important;
border-bottom: 1px solid #eee;
}
.tui-contact-info-h5-more-item-label {
color: #000;
}
.tui-contact-info-h5-more-item-content {
overflow: hidden;
color: #979797;
display: flex;
flex-direction: row;
justify-content: flex-end;
}
.tui-contact-info-h5-more-item-content-text {
overflow: hidden;
display: flex;
flex-direction: row;
}
.tui-contact-info-h5-more-item-content-text-data {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tui-contact-info-h5-more-item:last-child {
border-bottom: none;
}
.tui-contact-info-h5-button {
margin-top: 10px !important;
display: flex;
flex-direction: column;
padding: 0;
background-color: #fff;
}
.tui-contact-info-h5-button-item {
width: 100%;
margin: 0;
border: none;
padding: 16px !important;
font-size: 16px;
border-bottom: 1px solid #eee;
height: fit-content;
}
.tui-contact-info-h5-button-item::after {
border: none;
}
.tui-contact-info-h5-button-item-textarea {
background-color: #f8f8f8;
}
.tui-contact-info-h5-button-item:last-child {
border-bottom: none;
}
.tui-contact-info-h5-button .tui-contact-info-button-item-cancel {
background-color: #fff;
color: #006eff;
}
.tui-contact-info-h5-button .tui-contact-info-button-item-submit {
background-color: #fff;
color: #FE3C3C;
}

View File

@ -119,12 +119,13 @@
.tui-contact-info-button-item-cancel { .tui-contact-info-button-item-cancel {
background-color: #fff; background-color: #fff;
color: #e54545; color: #006eff;
} }
.tui-contact-info-button-item-submit { .tui-contact-info-button-item-submit {
background-color: #fff; background-color: #fff;
color: #006eff;
color: #FE3C3C;
} }
} }
} }

View File

@ -34,7 +34,7 @@ import { onHide } from '@dcloudio/uni-app';
import './entry.ts'; import './entry.ts';
// #endif // #endif
const emits = defineEmits(['handleSwitchConversation']); const emits = defineEmits(['handleSwitchConversation','state']);
const totalUnreadCount = ref(0); const totalUnreadCount = ref(0);
const headerRef = ref<typeof ConversationHeader>(); const headerRef = ref<typeof ConversationHeader>();
@ -56,6 +56,7 @@ TUIStore.watch(StoreName.CUSTOM, {
}); });
const handleSwitchConversation = (conversationID: string) => { const handleSwitchConversation = (conversationID: string) => {
emits('state',false);
TUIGlobal?.navigateTo({ TUIGlobal?.navigateTo({
url: '/TUIKit/components/TUIChat/index', url: '/TUIKit/components/TUIChat/index',
}); });

View File

@ -17,9 +17,9 @@ const groupIntroConfig = [
// }, // },
{ {
icon: 'https://web.sdk.qcloud.com/im/assets/images/Work.svg', icon: 'https://web.sdk.qcloud.com/im/assets/images/Work.svg',
label: '好友工作Work', label: '好友群',
type: TUIChatEngine.TYPES.GRP_WORK, type: TUIChatEngine.TYPES.GRP_WORK,
detail: '类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主审批。详见', detail: '类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主审批',
src: '产品文档', src: '产品文档',
}, },
// { // {

View File

@ -30,6 +30,7 @@
<li class="group-list-item"> <li class="group-list-item">
<label class="group-list-item-label">{{ TUITranslateService.t('TUIGroup.群头像') }}</label> <label class="group-list-item-label">{{ TUITranslateService.t('TUIGroup.群头像') }}</label>
<Avatar :url="groupInfo.profile.avatar" /> <Avatar :url="groupInfo.profile.avatar" />
<!-- {{ }} -->
</li> </li>
<ul> <ul>
<li <li
@ -76,12 +77,12 @@
> >
<label class="introduction-name">{{ groupTypeDetail.label }}</label> <label class="introduction-name">{{ groupTypeDetail.label }}</label>
<span class="introduction-detail">{{ groupTypeDetail.detail }}</span> <span class="introduction-detail">{{ groupTypeDetail.detail }}</span>
<a <!-- <a
:href="documentLink.product.url" :href="documentLink.product.url"
target="view_window" target="view_window"
> >
{{ TUITranslateService.t(`TUIGroup.${groupTypeDetail.src}`) }} {{ TUITranslateService.t(`TUIGroup.${groupTypeDetail.src}`) }}
</a> </a> -->
</article> </article>
</li> </li>
</ul> </ul>
@ -205,10 +206,8 @@ const createInfo = computed(() => {
? [groupNameInput] ? [groupNameInput]
: [groupNameInput, groupIDInput]; : [groupNameInput, groupIDInput];
}); });
const submitDisabledStatus = computed(() => { const submitDisabledStatus = computed(() => {
return groupInfo.profile.name === '' && !groupInfo.isEdit; return groupInfo.profile.name === '' && !groupInfo.isEdit;
}); });
const selected = (type: any) => { const selected = (type: any) => {

View File

@ -0,0 +1,102 @@
.group {
background: #FFF;
}
.group-list-item {
background: #FFF;
}
.group-list-item label {
font-family: PingFangSC-Regular;
font-weight: 400;
color: #333;
}
.group-list input {
border: 1px solid rgba(131, 137, 153, 0.4);
font-weight: 400;
color: #333;
}
.group-list-edit {
background: #FFF;
}
.group-profile-footer {
background: #FFF;
}
.group-h5 {
background: #F7F8FA;
}
.group-h5-list-item-introduction {
font-family: PingFangSC-Regular;
font-weight: 400;
color: #888;
}
.group-h5-list-item-introduction a {
color: #006EFF;
}
.select {
flex: 1;
}
.select a {
color: #006EFF;
}
.select-item {
border: 1px solid rgba(131, 137, 153, 0.4);
}
.select-item-header .left {
font-weight: 500;
color: #333;
}
.select-item-detail {
color: #4F4F4F;
}
.select .selected {
border: 1px solid #006EFF;
}
header {
background: #FFF;
}
header h1 {
font-family: PingFangSC-Medium;
font-weight: 500;
color: #000;
letter-spacing: 0;
}
.btn-default {
background: #FFF;
border: 1px solid #DDD;
font-family: PingFangSC-Medium;
font-weight: 500;
color: #828282;
}
.btn-submit {
width: 100%;
background: #3370FF;
border: 0 solid #2F80ED;
font-family: PingFangSC-Regular;
font-weight: 400;
color: #FFF;
letter-spacing: 0;
background-color: #fe3c3c;
}
.btn-submit:disabled {
background: #e8e8e9;
border: 1px solid #DDD;
color: #FFF;
}

View File

@ -89,12 +89,14 @@ header {
} }
.btn-submit { .btn-submit {
width: 100%;
background: #3370FF; background: #3370FF;
border: 0 solid #2F80ED; border: 0 solid #2F80ED;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
color: #FFF; color: #FFF;
letter-spacing: 0; letter-spacing: 0;
background-color: #fe3c3c;
&:disabled { &:disabled {
background: #e8e8e9; background: #e8e8e9;

View File

@ -0,0 +1,104 @@
.group {
padding: 30px;
box-sizing: border-box;
width: 750px;
max-height: calc(100vh - 100px);
overflow-y: auto;
border-radius: 10px;
}
.group .group-box .group-box-header {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
}
.group .group-box .group-box-header .group-box-header-title {
font-size: 18px;
line-height: 30px;
}
.group-list-item {
display: flex;
padding: 10px 0;
}
.group-list-item-label {
width: 84px;
}
.group-list input {
flex: 1;
box-sizing: border-box;
padding: 6px 10px;
border-radius: 2px;
font-size: 14px;
line-height: 20px;
}
.select {
flex: 1;
}
.select-item {
padding: 12px 20px !important;
border-radius: 2px;
margin-bottom: 20px !important;
}
.select-item-header {
display: flex;
justify-content: space-between;
}
.select-item-header .left {
display: flex;
align-items: center;
font-size: 14px;
}
.select-item-header .left .icon {
margin-right: 12px;
}
.select-item-header .icon-selected {
position: relative;
left: 12px;
top: -4px;
}
.select-item-type {
text-align: left;
}
.select-item-detail {
padding-top: 6px;
font-size: 14px;
}
.select-item .link {
display: inline-block;
}
.group-profile-footer {
padding-top: 10px;
display: flex;
justify-content: flex-end;
}
.btn-default {
width: 82px;
height: 32px;
border-radius: 4px;
font-size: 14px;
background-color: #fe3c3c;
}
.btn-submit {
width: 100%;
background-color: #fe3c3c;
height: 32px;
border-radius: 4px;
margin-left: 10px;
font-size: 14px;
}

View File

@ -95,10 +95,12 @@
height: 32px; height: 32px;
border-radius: 4px; border-radius: 4px;
font-size: 14px; font-size: 14px;
background-color: #fe3c3c;
} }
.btn-submit { .btn-submit {
width: 82px; width: 100%;
background-color: #fe3c3c;
height: 32px; height: 32px;
border-radius: 4px; border-radius: 4px;
margin-left: 10px; margin-left: 10px;

View File

@ -197,11 +197,13 @@ const close = (tabName: string) => {
border: 0 solid #2f80ed; border: 0 solid #2f80ed;
padding: 4px 28px; padding: 4px 28px;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 14px;
color: #fff; color: #fff;
line-height: 24px; line-height: 24px;
border-radius: 4px; border-radius: 4px;
display: flex ;
align-items: center;
background-color: #fe3c3c;
&-cancel { &-cancel {
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
@ -237,7 +239,7 @@ const close = (tabName: string) => {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
font-size: 18px; font-size: 18px;
color: #3370ff; color: #fe3c3c;
letter-spacing: 0; letter-spacing: 0;
line-height: 27px; line-height: 27px;
} }

View File

@ -35,6 +35,7 @@
<button <button
class="btn btn-cancel" class="btn btn-cancel"
@click="close" @click="close"
style="color: #fff;display: flex;justify-content: center;align-items: center"
> >
{{ TUITranslateService.t('component.取消') }} {{ TUITranslateService.t('component.取消') }}
</button> </button>

View File

@ -0,0 +1,46 @@
.dialog {
background: rgba(0, 0, 0, 0.6);
}
.dialog-main {
background: #FFF;
}
.dialog-main-header {
font-weight: 500;
color: #333;
}
.dialog-main-title {
font-family: PingFangSC-Medium;
font-weight: 500;
color: #333;
}
.dialog-main-back {
background: none;
}
.dialog-main-content {
font-weight: 400;
color: #333;
}
.btn {
font-weight: 400;
color: #FFF;
letter-spacing: 0;
background-color: #fe3c3c;
}
.btn-cancel {
border: 1px solid #ddd;
color: #666;
background-color: #fe3c3c;
}
.btn-default {
background: #006EFF;
border: 1px solid #006EFF;
background-color: #fe3c3c;
}

View File

@ -30,14 +30,16 @@
font-weight: 400; font-weight: 400;
color: #FFF; color: #FFF;
letter-spacing: 0; letter-spacing: 0;
background-color: #fe3c3c;
&-cancel { &-cancel {
border: 1px solid #ddd; border: 1px solid #ddd;
color: #666; color: #666;
background-color: #fe3c3c;
} }
&-default { &-default {
background: #006EFF; background: #006EFF;
border: 1px solid #006EFF; border: 1px solid #006EFF;
background-color: #fe3c3c;
} }
} }

View File

@ -0,0 +1,59 @@
.dialog-h5 {
height: 95%;
top: 30px;
align-items: inherit;
}
.dialog-h5 .dialog-main {
border-radius: 0;
padding: 0;
display: flex;
flex-direction: column;
overflow: hidden;
width: 100%;
min-height: 80px;
min-width: 120px;
}
.dialog-h5 .dialog-main-content {
flex: 1;
min-width: 0;
min-height: 0;
overflow: hidden;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 0;
}
.dialog-h5 .dialog-main-content-uniapp {
padding: 40px 0;
}
.dialog-h5 .dialog-main-footer {
border-top: 1px solid #DDD;
}
.dialog-h5 .dialog-main-footer .btn {
flex: 1;
margin: 0;
background: none;
border-right: 1px solid #DDD;
background-color: #fe3c3c;
}
.dialog-h5 .dialog-main-footer .btn-default {
color: #fff;
border: none;
background-color: #fe3c3c;
display: flex;
align-items: center;
justify-content: center;
}
.center {
align-items: center;
padding: 20px;
box-sizing: border-box;
}

View File

@ -1,6 +1,6 @@
.dialog-h5 { .dialog-h5 {
height: 100%; height: 95%;
top: 0; top: 30px;
align-items: inherit; align-items: inherit;
.dialog { .dialog {
@ -38,10 +38,14 @@
margin: 0; margin: 0;
background: none; background: none;
border-right: 1px solid #DDD; border-right: 1px solid #DDD;
background-color: #fe3c3c;
&-default { &-default {
color: #FF584C; color: #fff;
border: none; border: none;
background-color: #fe3c3c;
display: flex;
align-items: center;
justify-content: center;
} }
} }
} }

View File

@ -0,0 +1,63 @@
.dialog {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 6;
display: flex;
justify-content: center;
align-items: center;
}
.dialog-main {
min-width: 368px;
border-radius: 10px;
padding: 20px 30px;
}
.dialog-main-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
line-height: 30px;
}
.dialog-main-title {
font-size: 16px;
line-height: 30px;
}
.dialog-main-content {
font-size: 14px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.dialog-main-footer {
display: flex;
justify-content: flex-end;
}
.btn {
padding: 8px 20px;
margin: 0 6px;
border-radius: 4px;
border: none;
font-size: 14px;
text-align: center;
line-height: 20px;
display: flex;
align-items: center;
}
.btn:disabled {
opacity: 0.3;
}
.btn:last-child {
margin-right: 0;
}

View File

@ -50,7 +50,8 @@
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
display: flex;
align-items: center;
&:disabled { &:disabled {
opacity: 0.3; opacity: 0.3;
} }

View File

@ -3,20 +3,9 @@
class="transfer" class="transfer"
:class="[!isPC ? 'transfer-h5' : '', isWeChat ? 'transfer-h5-wechat' : '']" :class="[!isPC ? 'transfer-h5' : '', isWeChat ? 'transfer-h5-wechat' : '']"
> >
<header <header v-if="!isPC" class="transfer-header transfer-h5-header">
v-if="!isPC" <div v-if="!props.isHiddenBackIcon" @click="cancel">
class="transfer-header transfer-h5-header" <Icon class="icon" :file="backIcon" :width="'18px'" :height="'18px'" />
>
<div
v-if="!props.isHiddenBackIcon"
@click="cancel"
>
<Icon
class="icon"
:file="backIcon"
:width="'18px'"
:height="'18px'"
/>
</div> </div>
<span class="title">{{ transferTitle }}</span> <span class="title">{{ transferTitle }}</span>
<span class="space" /> <span class="space" />
@ -33,7 +22,7 @@
enterkeyhint="search" enterkeyhint="search"
:class="[isUniFrameWork ? 'left-uniapp-input' : '']" :class="[isUniFrameWork ? 'left-uniapp-input' : '']"
@keyup.enter="handleInput" @keyup.enter="handleInput"
> />
<!-- not PC triggers blur --> <!-- not PC triggers blur -->
<input <input
v-if="!isPC && isTransferSearch" v-if="!isPC && isTransferSearch"
@ -44,7 +33,7 @@
:class="[isUniFrameWork ? 'left-uniapp-input' : '']" :class="[isUniFrameWork ? 'left-uniapp-input' : '']"
@blur="handleInput" @blur="handleInput"
@confirm="handleInput" @confirm="handleInput"
> />
</header> </header>
<main class="transfer-left-main"> <main class="transfer-left-main">
<ul class="transfer-list"> <ul class="transfer-list">
@ -59,10 +48,7 @@
:width="'18px'" :width="'18px'"
:height="'18px'" :height="'18px'"
/> />
<i <i v-else class="icon-unselected" />
v-else
class="icon-unselected"
/>
<span class="select-all">{{ <span class="select-all">{{
TUITranslateService.t("component.全选") TUITranslateService.t("component.全选")
}}</span> }}</span>
@ -89,18 +75,17 @@
class="avatar" class="avatar"
:src=" :src="
item.avatar || item.avatar ||
'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png' 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
" "
onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'" onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
> />
<span class="name">{{ item.nick || item.userID }}</span> <span class="name">{{ item.nick || item.userID }}</span>
<span v-if="item.isDisabled">{{ TUITranslateService.t("component.已在群中") }}</span> <span v-if="item.isDisabled"
>{{ TUITranslateService.t("component.已在群中") }}</span
>
</template> </template>
<template v-else> <template v-else>
<slot <slot name="left" :data="item" />
name="left"
:data="item"
/>
</template> </template>
</li> </li>
<li <li
@ -114,16 +99,10 @@
</main> </main>
</div> </div>
<div class="right"> <div class="right">
<header <header v-if="isPC" class="transfer-header">
v-if="isPC"
class="transfer-header"
>
{{ transferTitle }} {{ transferTitle }}
</header> </header>
<ul <ul v-if="resultShow" class="transfer-list">
v-if="resultShow"
class="transfer-list"
>
<p <p
v-if="transferSelectedList.length > 0 && isPC" v-if="transferSelectedList.length > 0 && isPC"
class="transfer-text" class="transfer-text"
@ -143,31 +122,20 @@
class="avatar" class="avatar"
:src=" :src="
item.avatar || item.avatar ||
'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png' 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'
" "
onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'" onerror="this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
> />
<span <span v-if="isPC" class="name">{{
v-if="isPC" item.nick || item.userID
class="name" }}</span>
>{{ item.nick || item.userID }}</span>
</template> </template>
<template v-else> <template v-else>
<slot <slot name="right" :data="item" />
name="right"
:data="item"
/>
</template> </template>
</aside> </aside>
<span <span v-if="isPC" @click="selected(item)">
v-if="isPC" <Icon :file="cancelIcon" :width="'18px'" :height="'18px'" />
@click="selected(item)"
>
<Icon
:file="cancelIcon"
:width="'18px'"
:height="'18px'"
/>
</span> </span>
</li> </li>
</ul> </ul>
@ -175,6 +143,7 @@
<button <button
class="btn btn-cancel" class="btn btn-cancel"
@click="cancel" @click="cancel"
style="display: flex; justify-content: center; align-items: center"
> >
{{ TUITranslateService.t("component.取消") }} {{ TUITranslateService.t("component.取消") }}
</button> </button>
@ -182,6 +151,13 @@
v-if="transferSelectedList.length > 0" v-if="transferSelectedList.length > 0"
class="btn" class="btn"
@click="submit" @click="submit"
style="
background-color: #fe3c3c;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
"
> >
{{ TUITranslateService.t("component.完成") }} {{ TUITranslateService.t("component.完成") }}
</button> </button>
@ -189,6 +165,13 @@
v-else v-else
class="btn btn-no" class="btn btn-no"
@click="submit" @click="submit"
style="
background-color: #fe3c3c;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
"
> >
{{ TUITranslateService.t("component.完成") }} {{ TUITranslateService.t("component.完成") }}
</button> </button>
@ -199,14 +182,14 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watchEffect, computed } from '../../../adapter-vue'; import { ref, watchEffect, computed } from "../../../adapter-vue";
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine'; import { TUITranslateService } from "@tencentcloud/chat-uikit-engine";
import { ITransferListItem } from '../../../interface'; import { ITransferListItem } from "../../../interface";
import Icon from '../Icon.vue'; import Icon from "../Icon.vue";
import selectedIcon from '../../../assets/icon/selected.svg'; import selectedIcon from "../../../assets/icon/selected.svg";
import backIcon from '../../../assets/icon/back.svg'; import backIcon from "../../../assets/icon/back.svg";
import cancelIcon from '../../../assets/icon/cancel.svg'; import cancelIcon from "../../../assets/icon/cancel.svg";
import { isPC, isUniFrameWork, isWeChat } from '../../../utils/env'; import { isPC, isUniFrameWork, isWeChat } from "../../../utils/env";
const props = defineProps({ const props = defineProps({
list: { list: {
@ -231,11 +214,11 @@ const props = defineProps({
}, },
title: { title: {
type: String, type: String,
default: '', default: "",
}, },
type: { type: {
type: String, type: String,
default: '', default: "",
}, },
resultShow: { resultShow: {
type: Boolean, type: Boolean,
@ -256,14 +239,14 @@ const transferTotal = ref<number>(0);
const transferSelectedList = ref<ITransferListItem[]>([]); const transferSelectedList = ref<ITransferListItem[]>([]);
const isTransferSearch = ref(true); const isTransferSearch = ref(true);
const isTransferCustomItem = ref(false); const isTransferCustomItem = ref(false);
const transferTitle = ref(''); const transferTitle = ref("");
const searchValue = ref(''); const searchValue = ref("");
watchEffect(() => { watchEffect(() => {
if (props.isCustomItem) { if (props.isCustomItem) {
for (let index = 0; index < props.list.length; index++) { for (let index = 0; index < props.list.length; index++) {
if ( if (
(props.list[index] as any).conversationID.indexOf('@TIM#SYSTEM') > -1 (props.list[index] as any).conversationID.indexOf("@TIM#SYSTEM") > -1
) { ) {
// eslint-disable-next-line vue/no-mutating-props // eslint-disable-next-line vue/no-mutating-props
props.list.splice(index, 1); props.list.splice(index, 1);
@ -274,21 +257,25 @@ watchEffect(() => {
transferList.value = props.list as ITransferListItem[]; transferList.value = props.list as ITransferListItem[];
} }
transferTotal.value = props.total ? props.total : props.list.length; transferTotal.value = props.total ? props.total : props.list.length;
transferSelectedList.value = (props.selectedList && props.selectedList.length > 0 ? props.selectedList : transferSelectedList.value) as any; transferSelectedList.value = (
props.selectedList && props.selectedList.length > 0
? props.selectedList
: transferSelectedList.value
) as any;
isTransferSearch.value = props.isSearch; isTransferSearch.value = props.isSearch;
isTransferCustomItem.value = props.isCustomItem; isTransferCustomItem.value = props.isCustomItem;
transferTitle.value = props.title; transferTitle.value = props.title;
}); });
const emit = defineEmits(['search', 'submit', 'cancel', 'getMore']); const emit = defineEmits(["search", "submit", "cancel", "getMore"]);
const optional = computed(() => const optional = computed(() =>
transferList.value.filter((item: any) => !item.isDisabled), transferList.value.filter((item: any) => !item.isDisabled)
); );
const handleInput = (e: any) => { const handleInput = (e: any) => {
searchValue.value = e.target.value || e.detail.value; searchValue.value = e.target.value || e.detail.value;
emit('search', searchValue.value); emit("search", searchValue.value);
}; };
const selected = (item: any) => { const selected = (item: any) => {
if (item.isDisabled) { if (item.isDisabled) {
@ -315,17 +302,17 @@ const selectedAll = () => {
}; };
const submit = () => { const submit = () => {
emit('submit', transferSelectedList.value); emit("submit", transferSelectedList.value);
searchValue.value = ''; searchValue.value = "";
}; };
const cancel = () => { const cancel = () => {
emit('cancel'); emit("cancel");
searchValue.value = ''; searchValue.value = "";
}; };
const getMore = () => { const getMore = () => {
emit('getMore'); emit("getMore");
}; };
</script> </script>

View File

@ -0,0 +1,91 @@
.transfer-h5 {
width: 100%;
height: 92%;
display: flex;
flex-direction: column;
}
.transfer-h5-wechat {
width: 100vw;
height: 100vh;
}
.transfer-h5-header {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
padding: 16px 18px;
}
.transfer-h5-header .space, .transfer-h5-header .icon {
width: 18px;
height: 18px;
}
.transfer-h5 .main {
flex: 1;
flex-direction: column;
width: auto;
height: auto;
border-radius: 0;
border: none;
box-shadow: none;
max-height: calc(100% - 50px);
padding: 0;
}
.transfer-h5 .main .avatar {
border-radius: 5px;
}
.transfer-h5 .main .left {
padding: 0;
flex: 1;
border: none;
display: flex;
flex-direction: column;
}
.transfer-h5 .main .left .transfer-header {
position: sticky;
top: 0;
padding: 0 18px;
}
.transfer-h5 .main .left .transfer-header input {
border-radius: 5px;
font-size: 14px;
}
.transfer-h5 .main .left-uniapp-input {
height: 36px;
}
.transfer-h5 .main .right {
flex: 0;
flex-direction: row;
align-items: center;
box-shadow: inset 0 1px 0 0 #EEE;
padding: 8px 18px;
}
.transfer-h5 .main .right .transfer-list {
flex-direction: row;
width: 0;
}
.transfer-h5 .main .right .transfer-list-item-content {
flex: none;
}
.transfer-h5 .main .right .transfer-right-footer {
padding: 6px 0;
display: flex;
align-items: center;
}
.transfer-h5 .main .right .transfer-right-footer .btn {
font-size: 14px;
}

View File

@ -1,6 +1,6 @@
.transfer-h5 { .transfer-h5 {
width: 100%; width: 100%;
height: 100%; height: 92%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -86,6 +86,7 @@
.btn { .btn {
font-size: 14px; font-size: 14px;
} }
} }
} }

View File

@ -23,7 +23,7 @@ export function getArticleCategory(category_type) {
*/ */
export function getArticleDetail(type) { export function getArticleDetail(type) {
return http.request({ return http.request({
url: `/other/article/get/${type}`, url: `/other/article/type/${type}`,
method: Method.GET, method: Method.GET,
}); });
} }

View File

@ -23,6 +23,32 @@ export function mymon() {
needToken: true, needToken: true,
}); });
} }
/**
* 达人下的用户
* @param params
*/
export function bindUsers() {
return http.request({
url: '/share/code/expert/bind/users',
method: Method.GET,
needToken: true,
});
}
/**
* 分销的消费记录
* @param params
*/
export function getcompleted(data) {
return http.request({
url: '/share/code/completed-orders',
method: Method.GET,
needToken: true,
params:data
});
}
/** /**
* 绑定推荐码 * 绑定推荐码
* @param params * @param params

View File

@ -65,7 +65,7 @@ export default {
{ {
color: "#04BE02", color: "#04BE02",
title: "消息", title: "消息",
icon: "weixin-circle-fill", icon: "man-add-fill",
type: 2, type: 2,
}, },
], ],
@ -73,7 +73,7 @@ export default {
}, },
// typegoods,shop,pintuan) // typegoods,shop,pintuan)
props: ["thumbnail", "goodsName", "type", "goodsId", "link","price"], props: ["thumbnail", "goodsName", "type", "goodsId", "link", "price"],
methods: { methods: {
close() { close() {
this.$emit("close"); this.$emit("close");
@ -154,37 +154,34 @@ export default {
}); });
} }
if (val.type == 2) { if (val.type == 2) {
// const mofn =
// props: ["thumbnail", "goodsName", "type", "goodsId", "link","price"], this.goodsName +
// console.log(this.link,'===') "," +
// const mofn=JSON.stringify(':'+this.goodsName+',:'+this.price+','+this.link) this.price +
"," +
const mofn=this.goodsName+','+this.price+','+this.thumbnail.split('?')[0].split('com')[1]+','+this.link.split('?')[1] this.thumbnail.split("?")[0].split("com")[1] +
// const mofn={nage:this.goodsName,price:this.price,img:this.thumbnail.split('?')[0],link:this.link} "," +
console.log('===+++',mofn.split(',')[1]) this.link.split("?")[1];
console.log('===+++',this.thumbnail) uni.setClipboardData({
console.log('===+++',mofn.split(',')[3]) data: mofn,
// uni.setClipboardData({ success: () => {
// data: mofn, uni.showToast({
// success: () => { title: "复制成功",
// uni.showToast({ icon: "none",
// title: "", });
// icon: "none", uni.switchTab({
// }); url: "/pages/tabbar/im/index",
// uni.switchTab({ fail: (err) => {
// url: "/pages/tabbar/im/index", console.error("跳转失败--:", err); //
// fail: (err) => { },
// console.error("--:", err); // });
// }, },
// }); fail: () => {
uni.showToast({
// }, title: "不支持",
// fail: () => { });
// uni.showToast({ },
// title: "", });
// });
// },
// });
} }
}, },
// #endif // #endif

View File

@ -322,7 +322,7 @@ export default {
return `${m}:${s < 10 ? '0' : ''}${s}`; return `${m}:${s < 10 ? '0' : ''}${s}`;
}, },
onTimeUpdate(e) { onTimeUpdate(e) {
console.log(e.detail.currentTime); // console.log(e.detail.currentTime);
if (e.detail.currentTime > 0.2) { if (e.detail.currentTime > 0.2) {
this.doplay(e.detail.currentTime); this.doplay(e.detail.currentTime);
} }

View File

@ -1,4 +1,4 @@
const name = "lilishop"; //全局商城name const name = "无终街"; //全局商城name
const schemeName = 'lilishop' //唤醒app需要的schemeName const schemeName = 'lilishop' //唤醒app需要的schemeName
export default { export default {
name: name, name: name,

View File

@ -573,6 +573,18 @@
"navigationBarTitleText": "我的分销" "navigationBarTitleText": "我的分销"
} }
}, },
{
"path": "mydistribution/my/myindex",
"style": {
"navigationBarTitleText": "用户"
}
},
{
"path": "mydistribution/my/consumption",
"style": {
"navigationBarTitleText": "消费记录"
}
},
{ {
"path": "makeMoney/index", "path": "makeMoney/index",
"style": { "style": {

View File

@ -2,9 +2,9 @@
<view class="add-address"> <view class="add-address">
<div class="uForm"> <div class="uForm">
<u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules"> <u-form :border-bottom="false" :model="form" ref="uForm" :error-type="['toast']" :rule="rules">
<view class="selectAddress" @click="clickUniMap"> <!-- <view class="selectAddress" @click="clickUniMap">
选择收货地址 选择收货地址
</view> </view> -->
<u-form-item class="border" label="收货人" label-width="130" prop="name"> <u-form-item class="border" label="收货人" label-width="130" prop="name">
<u-input v-model="form.name" clearable placeholder="请输入收货人姓名" /> <u-input v-model="form.name" clearable placeholder="请输入收货人姓名" />
</u-form-item> </u-form-item>

View File

@ -319,15 +319,21 @@ export default {
border-color: #fe3c3c !important; border-color: #fe3c3c !important;
background-color: #fe3c3c !important; background-color: #fe3c3c !important;
} }
.u-radio__icon-wrap--checked{
border-color: #fe3c3c !important;
background-color: #fe3c3c !important;
}
} }
.bunem { .bunem {
width: 309px; width: 309px;
margin-top: 20px; margin-top: 20px;
height: 41px; height: 32px;
font-size: 15px; display: flex;
line-height: 41px; align-items: #ffffff;
text-align: center;
color: #ffffff;
margin-bottom: 35px; margin-bottom: 35px;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
} }
</style> </style>

View File

@ -1,7 +1,14 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="imgage" v-if="type=='about'">
<div>便捷生活畅玩无终街</div>
<!-- <div class="title">{{ loginTitleWay[current].title }}</div>
<div :class="current == 1 ? 'desc-light' : 'desc'">
{{ loginTitleWay[current].desc
}}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
</div> -->
</div>
<u-parse v-html="res.content"></u-parse> <u-parse v-html="res.content"></u-parse>
</div> </div>
</template> </template>
<script> <script>
@ -10,6 +17,7 @@ export default {
data() { data() {
return { return {
res: "", res: "",
type:"",
way: { way: {
user: { user: {
title: "用户协议", title: "用户协议",
@ -35,6 +43,7 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.way[option.type].title, title: this.way[option.type].title,
}); });
this.type = option.type;
this.init(option); this.init(option);
}, },
@ -53,4 +62,19 @@ export default {
.wrapper { .wrapper {
padding: 16rpx; padding: 16rpx;
} }
.imgage {
width: 100%;
height: 37.5vh;
background: url("@/static/logn.png");
background-size: 100% 100%;
& > div {
width: 100%;
height: 80%;
display: flex;
justify-content: center;
align-items: end;
color: #fff;
font-size: 14px;
}
}
</style> </style>

View File

@ -6,7 +6,7 @@
v-model="inviteCode" v-model="inviteCode"
type="text" type="text"
aria-placeholder=" aria-placeholder="
请输入推荐码" 请输入推荐码/手机号"
/> />
</div> </div>
<div class="si_bottom"> <div class="si_bottom">

View File

@ -80,10 +80,9 @@ export default {
return { return {
show: false, show: false,
menuItems: [ menuItems: [
{name:"我的用户",url:''}, {name:"我的用户",url:'/pages/mine/mydistribution/my/myindex'},
{name:"消费记录",url:''}, {name:"消费记录",url:'/pages/mine/mydistribution/my/consumption'},
{name:"收益明细",url:''}, {name:"收益明细",url:''},
{name:"提现记录",url:''},
{name:"我的邀请码",url:'/pages/mine/invite'}, {name:"我的邀请码",url:'/pages/mine/invite'},
] ]
}; };

View File

@ -0,0 +1,107 @@
<template>
<div class="distribution-container">
<div class="distribution-header">
<view :style="{ textAlign: 'center' }">分销收益</view>
<view class="hcolng" :style="{ textAlign: 'center' }">
<view :style="{ fontSize: '30px' }"></view>
<view :style="{ fontSize: '30px' }">{{ totle }}</view>
<view :style="{ fontSize: '30px' }">积分</view>
</view>
</div>
<div class="distribution-center">
<div>
<div>头像</div>
<div>消费金额</div>
<div>日期</div>
</div>
<div
v-for="(item, index) in getlist"
:key="item.id"
:style="{ background: index % 2 == 0 ? '#fff' : '' }"
>
<div>
<img :src="item.face" alt="" width="60" style="border-radius: 50%" />
</div>
<div>{{ item.nickName }}</div>
<div>{{ timefun(item.lastLoginDate) }}</div>
</div>
</div>
</div>
</template>
<script>
import { bindUsers, getcompleted } from "@/api/point.js";
export default {
name: "MyDistribution",
data() {
return {
show: false,
totle: 0,
getlist: [],
size:1,
page:10,
};
},
mounted() {
this.getl();
},
methods: {
timefun(e) {
return e.split(" ")[0];
},
touni(e) {
uni.navigateTo({ url: e });
},
goToDepositPage() {
uni.navigateTo({ url: "/pages/mine/deposit/operation" });
},
getl() {
getcompleted({size:this.size,page:this.page}).then((res) => {
this.getlist = res.data.result;
this.totle = res.data.result.length;
});
},
},
};
</script>
<style lang="scss" scoped>
.distribution-container {
font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
width: 100%;
color: #333;
.distribution-header {
background-color: #ff7d00;
color: white;
padding: 25px 20px;
.hcolng {
display: flex;
justify-content: center;
padding: 10px 20px;
margin-top: 50px;
& > view {
font-weight: 700;
display: flex;
font-size: 14px;
margin: 0 5px;
align-items: end;
}
}
}
.distribution-center {
display: flex;
flex-direction: column;
& > div {
display: flex;
justify-content: space-evenly;
padding: 10px 0px 10px 0px;
& > div {
width: 30%;
text-align: center;
}
}
// justify-content: space-evenly;
}
}
</style>

View File

@ -0,0 +1,107 @@
<template>
<div class="distribution-container">
<!-- Header section -->
<div class="distribution-header">
<view class="hcolng">
<view></view>
<view :style="{ fontSize: '30px' }">{{ totle }}</view>
<view></view>
</view>
</div>
<div class="distribution-center">
<div>
<div>用户头像</div>
<div>昵称</div>
<div>绑定日期</div>
</div>
<div
v-for="(item, index) in getlist"
:key="item.id"
:style="{ background: index % 2 == 0 ? '#fff' : '' }"
>
<div>
<img :src="item.face" alt="" width="60" style="border-radius: 50%" />
</div>
<div>{{ item.nickName }}</div>
<div>{{ timefun(item.lastLoginDate) }}</div>
</div>
</div>
</div>
</template>
<script>
import { bindUsers } from "@/api/point.js";
export default {
name: "MyDistribution",
data() {
return {
show: false,
totle: 0,
getlist: [],
};
},
mounted() {
this.getl();
},
methods: {
timefun(e) {
return e.split(" ")[0];
},
touni(e) {
uni.navigateTo({ url: e });
},
goToDepositPage() {
uni.navigateTo({ url: "/pages/mine/deposit/operation" });
},
getl() {
bindUsers({}).then((res) => {
this.getlist = res.data.result;
this.totle = res.data.result.length;
});
},
},
};
</script>
<style lang="scss" scoped>
.distribution-container {
font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
width: 100%;
color: #333;
.distribution-header {
background-color: #ff7d00;
color: white;
padding: 25px 20px;
display: flex;
justify-content: center;
align-items: center;
.hcolng {
display: flex;
padding: 10px 20px;
margin-top: 50px;
& > view {
font-weight: 700;
display: flex;
font-size: 14px;
margin: 0 5px;
align-items: end;
}
}
}
.distribution-center {
display: flex;
flex-direction: column;
& > div {
display: flex;
justify-content: space-evenly;
padding: 10px 0px 10px 0px;
& > div {
width: 30%;
text-align: center;
}
}
// justify-content: space-evenly;
}
}
</style>

View File

@ -33,6 +33,7 @@
max-count="1" max-count="1"
:action="action" :action="action"
@on-uploaded="onUploadedtwo" @on-uploaded="onUploadedtwo"
@on-remove="onRemove"
style="margin-left: 30px" style="margin-left: 30px"
></u-upload> ></u-upload>
<div class="describe">请压缩图片在2M以内格式为gifjpgpng</div> <div class="describe">请压缩图片在2M以内格式为gifjpgpng</div>
@ -207,6 +208,9 @@ export default {
this.form.storeLogo.push(item.response.result); this.form.storeLogo.push(item.response.result);
}); });
}, },
onRemove(lists) {
this.form.storeLogo = [];
},
// //
next() { next() {
this.$refs.thirdForm.validate((valid) => { this.$refs.thirdForm.validate((valid) => {
@ -220,11 +224,11 @@ export default {
applyThird(params) applyThird(params)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false;
uni.showToast({ // uni.showToast({
title: "请正确输入", // title: "",
icon: "none", // icon: "none",
duration: 1500, // duration: 1500,
}); // });
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.switchTab({
url: "/pages/tabbar/user/my", url: "/pages/tabbar/user/my",
@ -307,12 +311,15 @@ h4 {
} }
.bunem { .bunem {
width: 309px; width: 309px;
margin-top: 50px; margin-top: 20px;
height: 41px; height: 32px;
font-size: 15px; display: flex;
line-height: 41px; align-items: #ffffff;
text-align: center; margin-bottom: 35px;
color: #ffffff; align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
} }
::v-deep { ::v-deep {
.u-checkbox__icon-wrap--checked { .u-checkbox__icon-wrap--checked {

View File

@ -5,7 +5,7 @@
<u-form-item prop="companyName" label="公司名称"> <u-form-item prop="companyName" label="公司名称">
<u-input v-model="form.companyName" placeholder="请填写公司信息" /> <u-input v-model="form.companyName" placeholder="请填写公司信息" />
</u-form-item> </u-form-item>
<u-form-item prop="companyAddressIdPath" label="公司所在地"> <u-form-item label="公司所在地">
<u-input <u-input
v-model="path" v-model="path"
type="select" type="select"
@ -68,6 +68,8 @@
max-count="1" max-count="1"
style="margin-left: 70px" style="margin-left: 70px"
@on-uploaded="onUploadedone" @on-uploaded="onUploadedone"
@on-remove="onRemoveone"
></u-upload> ></u-upload>
</u-form-item> </u-form-item>
<h4>法人信息</h4> <h4>法人信息</h4>
@ -87,6 +89,7 @@
max-count="2" max-count="2"
:action="action" :action="action"
@on-uploaded="onUploadedtwo" @on-uploaded="onUploadedtwo"
@on-remove="onRemove"
style="margin-left: 70px" style="margin-left: 70px"
></u-upload> ></u-upload>
<div class="describe"> <div class="describe">
@ -140,11 +143,10 @@ export default {
form: { form: {
legalPhoto: [], legalPhoto: [],
licencePhoto: [], licencePhoto: [],
companyAddressIdPath: [],
legalId: "", legalId: "",
legalName: "", legalName: "",
companyName: "", companyName: "",
// companyAddressIdPath: "",
companyAddress: "", companyAddress: "",
employeeNum: "", employeeNum: "",
registeredCapital: "", registeredCapital: "",
@ -159,13 +161,6 @@ export default {
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
], ],
companyAddressIdPath: [
{
required: true,
message: "请选择公司所在地",
trigger: ["change"],
},
],
companyAddress: [ companyAddress: [
{ {
required: true, required: true,
@ -313,12 +308,17 @@ export default {
// //
this.form.consigneeAddressIdPath = []; this.form.consigneeAddressIdPath = [];
this.form.consigneeAddressPath = []; this.form.consigneeAddressPath = [];
this.form.companyAddressIdPath = [];
let name = ""; let name = "";
e.forEach((item, index) => { e.forEach((item, index) => {
if (item.id) { if (item.id) {
// //
this.form.consigneeAddressIdPath.push(item.id); this.form.consigneeAddressIdPath.push(item.id);
this.form.companyAddressIdPath.push(item.id);
console.log(item.id);
console.log(this.form.companyAddressIdPath);
this.form.consigneeAddressPath.push(item.localName); this.form.consigneeAddressPath.push(item.localName);
name += item.localName; name += item.localName;
this.form.companyAddressPath = name; this.form.companyAddressPath = name;
@ -349,12 +349,22 @@ export default {
this.form.licencePhoto = item.response.result; this.form.licencePhoto = item.response.result;
}); });
}, },
onRemoveone(index, lists) {
this.form.licencePhoto=[]
},
// //
onUploadedtwo(lists) { onUploadedtwo(lists) {
lists.forEach((item) => { lists.forEach((item) => {
this.form.legalPhoto.push(item.response.result); const fn = this.form.legalPhoto.indexOf(item.response.result);
if (fn == -1) {
this.form.legalPhoto.push(item.response.result);
}
}); });
}, },
onRemove(index, lists) {
this.form.legalPhoto.splice(index, 1);
},
// //
next() { next() {
@ -363,11 +373,14 @@ export default {
let params = JSON.parse(JSON.stringify(this.form)); let params = JSON.parse(JSON.stringify(this.form));
params.legalPhoto = this.form.legalPhoto.toString(); params.legalPhoto = this.form.legalPhoto.toString();
params.licencePhoto = this.form.licencePhoto.toString(); params.licencePhoto = this.form.licencePhoto.toString();
params.companyAddressIdPath = this.form.companyAddressIdPath.toString();
if ( if (
this.form.legalPhoto != "" && this.form.legalPhoto != "" &&
this.form.legalId != "" && this.form.legalId != "" &&
this.form.legalName != "" this.form.legalName != ""
) { ) {
console.log(params,'========');
applyFirst(params) applyFirst(params)
.then((res) => { .then((res) => {
if (res.data.success) { if (res.data.success) {
@ -417,12 +430,14 @@ export default {
.bunem { .bunem {
width: 309px; width: 309px;
margin-top: 20px; margin-top: 20px;
height: 41px; height: 32px;
font-size: 15px; display: flex;
line-height: 41px; align-items: #ffffff;
text-align: center;
color: #ffffff;
margin-bottom: 35px; margin-bottom: 35px;
align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
} }
.u-input { .u-input {
margin-left: 30px; // margin-left: 30px; //

View File

@ -175,12 +175,15 @@ h4 {
// } // }
.bunem{ .bunem{
width: 309px; width: 309px;
margin-top: 50px; margin-top: 20px;
height: 41px; height: 32px;
font-size: 15px; display: flex;
line-height: 41px; align-items: #ffffff;
text-align: center; margin-bottom: 35px;
color: #ffffff; align-items: center;
justify-content: center;
color: #fff;
font-size: 14px;
} }
.u-input { .u-input {
margin-left: 30px; // margin-left: 30px; //

View File

@ -1,8 +1,14 @@
<template> <template>
<view class="edition-intro"> <view class="edition-intro">
<image :src="config.logo" class="logo" /> <div class="imgage">
<h1> {{config.name}}</h1> <div>便捷生活畅玩无终街</div>
<!-- <div class="title">{{ loginTitleWay[current].title }}</div>
<div :class="current == 1 ? 'desc-light' : 'desc'">
{{ loginTitleWay[current].desc
}}<span v-if="current == 1">{{ mobile | secrecyMobile }}</span>
</div> -->
</div>
<view class='version'> <view class='version'>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
Version {{localVersion.version}} Version {{localVersion.version}}
@ -19,11 +25,11 @@
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item> <u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item> <u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item> <u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item> <u-cell-item title="公司介绍" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=about')"></u-cell-item>
</u-cell-group> </u-cell-group>
<view class="intro"> <!-- <view class="intro">
<view>{{config.customerServiceMobile ? `客服热线:${config.customerServiceMobile}` : ``}}</view> <view>{{config.customerServiceMobile ? `客服热线:${config.customerServiceMobile}` : ``}}</view>
<view style="margin:20rpx 0 0 0;">{{config.customerServiceEmail ? `客服邮箱:${config.customerServiceEmail}` : ``}}</view> <view style="margin:20rpx 0 0 0;">{{config.customerServiceEmail ? `客服邮箱:${config.customerServiceEmail}` : ``}}</view>
@ -31,7 +37,7 @@
<view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">{{config.name}}用户协议</view> <view style="margin:20rpx 0; color:#003a8c;" @click="navigateTo('/pages/mine/help/tips?type=user')">{{config.name}}用户协议</view>
<view>CopyRight @{{config.name}} </view> <view>CopyRight @{{config.name}} </view>
</view> </view>
</view> </view> -->
</view> </view>
</template> </template>
@ -136,7 +142,7 @@ page {
background: #fff; background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; // justify-content: center;
align-items: center; align-items: center;
> h1 { > h1 {
@ -154,7 +160,22 @@ page {
letter-spacing: 2rpx; letter-spacing: 2rpx;
} }
.logo { .logo {
width: 200rpx; width: 100%;
height: 200rpx; // height: 200rpx;
}
.imgage {
width: 100%;
height: 37.5vh;
background: url("@/static/logn.png");
background-size: 100% 100%;
& > div {
width: 100%;
height: 80%;
display: flex;
justify-content: center;
align-items: end;
color: #fff;
font-size: 14px;
}
} }
</style> </style>

View File

@ -39,7 +39,15 @@
placeholder="请选择城市" placeholder="请选择城市"
right-icon="arrow-right" right-icon="arrow-right"
> >
<div style="width: 100%" @click="clickRegion"> <div
style="
width: 32vh;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
@click="clickRegion"
>
{{ form.___path || "请选择城市" }} {{ form.___path || "请选择城市" }}
</div> </div>
</u-form-item> </u-form-item>
@ -87,7 +95,7 @@ export default {
form: { form: {
nickName: storage.getUserInfo().nickName || "", nickName: storage.getUserInfo().nickName || "",
birthday: storage.getUserInfo().birthday || "", birthday: storage.getUserInfo().birthday || "",
face: storage.getUserInfo().face || "/static/missing-face.png", // face: storage.getUserInfo().face || "/static/imlogo.png", //
regionId: [], //Id regionId: [], //Id
region: storage.getUserInfo().region || [], // region: storage.getUserInfo().region || [], //
sex: storage.getUserInfo().sex, // sex: storage.getUserInfo().sex, //
@ -317,4 +325,7 @@ export default {
background-color: #fe3c3c !important; background-color: #fe3c3c !important;
} }
} }
.u-form-item div {
}
</style> </style>

View File

@ -20,7 +20,7 @@
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item> <u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<!-- #ifndef H5 --> <!-- #ifndef H5 -->
<!-- #endif --> <!-- #endif -->
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item> <u-cell-item :title="`关于我们`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
</u-cell-group> </u-cell-group>
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view> <view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view>
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true" <u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"

View File

@ -349,7 +349,7 @@ export default {
// //
this.routerVal = val; this.routerVal = val;
console.log(this.routerVal);
// //
if (this.routerVal.category) { if (this.routerVal.category) {
this.params.categoryId = this.routerVal.category; this.params.categoryId = this.routerVal.category;
@ -705,6 +705,8 @@ export default {
if (type == "refresh") { if (type == "refresh") {
this.goodsList = []; this.goodsList = [];
} }
console.log(this.params,'==');
// #TODO // #TODO
let goodsList = await getGoodsList(this.params); let goodsList = await getGoodsList(this.params);

View File

@ -113,7 +113,7 @@
borderRadius="10rpx" borderRadius="10rpx"
width="200rpx" width="200rpx"
height="200rpx" height="200rpx"
:src="val.goodsSku.thumbnail" :src="imgfun(val.goodsSku.thumbnail)"
alt alt
/> />
</div> </div>
@ -256,7 +256,6 @@
</u-row> </u-row>
</div> </div>
</div> </div>
<!-- 配送地区没有提示 --> <!-- 配送地区没有提示 -->
<div class="notSupportFreight" v-if="notSupportFreight.length != 0"> <div class="notSupportFreight" v-if="notSupportFreight.length != 0">
<u-notice-bar <u-notice-bar
@ -648,6 +647,8 @@ export default {
// //
this.getUserAddress(); this.getUserAddress();
} else { } else {
// console.log(res.data.result,"=====");
this.address = res.data.result.memberAddress; this.address = res.data.result.memberAddress;
res.data.result.memberAddress.consigneeAddressPath = res.data.result.memberAddress.consigneeAddressPath.split( res.data.result.memberAddress.consigneeAddressPath = res.data.result.memberAddress.consigneeAddressPath.split(
"," ","

View File

@ -75,7 +75,7 @@
</div> </div>
<!-- 循环出当前可使用的第三方登录模式 --> <!-- 循环出当前可使用的第三方登录模式 -->
<div class="flex login-list"> <!-- <div class="flex login-list">
<div <div
v-if="item.code" v-if="item.code"
:style="{ background: item.color }" :style="{ background: item.color }"
@ -100,7 +100,7 @@
height="80" height="80"
/> />
</div> </div>
</div> </div> -->
<myVerification <myVerification
v-if="codeFlag" v-if="codeFlag"
@send="verification" @send="verification"

View File

@ -243,9 +243,9 @@
<u-icon name="more-dot-fill"></u-icon> <u-icon name="more-dot-fill"></u-icon>
</view> </view>
</view> </view>
<view class="card-flex" @click="shutMask(3)" v-if="ste==1"> <view class="card-flex" @click="shutMask(3)" v-if="ste == 1">
<view class="card-title"> 送至</view> <view class="card-title"> 送至</view>
<view class="card-content" > <view class="card-content">
<span v-if="delivery">{{ <span v-if="delivery">{{
delivery.consigneeAddressPath | clearStrComma delivery.consigneeAddressPath | clearStrComma
}}</span> }}</span>
@ -256,9 +256,9 @@
<u-icon name="more-dot-fill"></u-icon> <u-icon name="more-dot-fill"></u-icon>
</view> </view>
</view> </view>
<view class="card-flex" v-else> <view class="card-flex" v-else @click="copyAddren">
<view class="card-title"> 店铺位置</view> <view class="card-title"> 位置</view>
<view class="card-content" > <view class="card-content">
{{ addren }} {{ addren }}
</view> </view>
@ -316,7 +316,7 @@
<view class="detail-btn" v-if="!isGroup"> <view class="detail-btn" v-if="!isGroup">
<view <view
class="to-store-car to-store-btn" class="to-store-car to-store-btn"
v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS' && ste==1 " v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS' && ste == 1"
@click="shutMask(4)" @click="shutMask(4)"
> >
加入购物车</view 加入购物车</view
@ -452,11 +452,11 @@ export default {
GoodsSwiper, GoodsSwiper,
popupGoods, popupGoods,
popupAddress, popupAddress,
TUIChatKit TUIChatKit,
}, },
data() { data() {
return { return {
addren:"", addren: "",
setup, setup,
promotionShow: false, // promotionShow: false, //
promotionFlag: true, // promotionFlag: true, //
@ -578,7 +578,7 @@ export default {
routerVal: "", routerVal: "",
IMLink: "", // IM IMLink: "", // IM
ste:1 ste: 1,
}; };
}, },
@ -604,7 +604,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.ste=uni.getStorageSync('ste') this.ste = uni.getStorageSync("ste");
const { windowHeight } = uni.getSystemInfoSync(); const { windowHeight } = uni.getSystemInfoSync();
let bottomHeight = 0; let bottomHeight = 0;
let topHeight = 0; let topHeight = 0;
@ -721,7 +721,7 @@ export default {
} }
/**商品信息以及规格信息存储 */ /**商品信息以及规格信息存储 */
this.goodsDetail = response.data.result.data; this.goodsDetail = response.data.result.data;
this.addren= response.data.result.storeAddressPath; this.addren = response.data.result.storeAddressPath;
this.goodsSpec = response.data.result.specs; this.goodsSpec = response.data.result.specs;
this.PromotionList = response.data.result.promotionMap; this.PromotionList = response.data.result.promotionMap;
@ -773,7 +773,7 @@ export default {
// storage.getUserInfo // storage.getUserInfo
getUserimInfo() getUserimInfo()
.then(({ data }) => { .then(({ data }) => {
if (data.success ) { if (data.success) {
const par = data.result; const par = data.result;
TUILogin.login({ TUILogin.login({
SDKAppID: par.sdkAppId, SDKAppID: par.sdkAppId,
@ -918,7 +918,15 @@ export default {
getStoreBaseInfoFun(id) { getStoreBaseInfoFun(id) {
API_store.getStoreBaseInfo(id).then((res) => { API_store.getStoreBaseInfo(id).then((res) => {
if (res.data.success) { if (res.data.success) {
this.storeDetail = res.data.result; if (res.data.result != "null") {
this.storeDetail = res.data.result;
} else {
uni.reLaunch({ url: "/" });
uni.showToast({
title: "店铺已关闭!",
icon: "none",
});
}
} }
}); });
}, },
@ -975,7 +983,6 @@ export default {
keyword: this.goodsDetail.name, keyword: this.goodsDetail.name,
}).then((res) => { }).then((res) => {
this.likeGoodsList = res.data.result.content; this.likeGoodsList = res.data.result.content;
}); });
}, },
@ -1155,6 +1162,17 @@ export default {
async shareChange() { async shareChange() {
this.shareFlage = true; this.shareFlage = true;
}, },
copyAddren() {
uni.setClipboardData({
data: this.addren,
success: () => {
uni.showToast({
title: "复制成功",
icon: "none",
});
},
});
},
}, },
}; };
</script> </script>

View File

@ -162,8 +162,6 @@ import config from "@/config/config";
import storage from "@/utils/storage"; import storage from "@/utils/storage";
import { getGoodsList } from "@/api/goods.js"; import { getGoodsList } from "@/api/goods.js";
import { getAllCoupons } from "@/api/promotions.js"; import { getAllCoupons } from "@/api/promotions.js";
import setup from "./product/popup/popup";
TUIChatKit.init();
export default { export default {
data() { data() {
return { return {
@ -350,9 +348,17 @@ export default {
*/ */
async getStoreData() { async getStoreData() {
let res = await getStoreBaseInfo(this.storeId); let res = await getStoreBaseInfo(this.storeId);
res.data.success if(res.data.success){
? (this.storeInfo = res.data.result) if(res.data.result!='null'){
: uni.reLaunch({ url: "/" }); this.storeInfo = res.data.result;
}else{
uni.reLaunch({ url: "/" })
uni.showToast({
title: "店铺已关闭!",
icon: "none",
});
}
}
}, },
/** 加载商品 */ /** 加载商品 */

View File

@ -904,7 +904,15 @@ export default {
getStoreBaseInfoFun(id) { getStoreBaseInfoFun(id) {
API_store.getStoreBaseInfo(id).then((res) => { API_store.getStoreBaseInfo(id).then((res) => {
if (res.data.success) { if (res.data.success) {
this.storeDetail = res.data.result; if (res.data.result != "null") {
this.storeDetail = res.data.result;
} else {
uni.reLaunch({ url: "/" });
uni.showToast({
title: "店铺已关闭!",
icon: "none",
});
}
} }
}); });
}, },

View File

@ -19,7 +19,7 @@
<view class="index-items"> <view class="index-items">
<view class="index-item" v-for="(item, key) in nav.goods" :key="key" @click="toGoods(item)"> <view class="index-item" v-for="(item, key) in nav.goods" :key="key" @click="toGoods(item)">
<view class="index-item-img"> <view class="index-item-img">
<u-image :src="item.thumbnail" mode="aspectFill"> <u-image :src="imgfun(item.thumbnail)" mode="aspectFill">
<u-loading slot="loading"></u-loading> <u-loading slot="loading"></u-loading>
</u-image> </u-image>
<view class="index-item-title">{{ item.goodsName }}</view> <view class="index-item-title">{{ item.goodsName }}</view>

View File

@ -5,7 +5,7 @@
<u-image shape="circle" :lazy-load="true" width="100" height="100" <u-image shape="circle" :lazy-load="true" width="100" height="100"
:src="userInfo.face || '/static/missing-face.png'"></u-image> :src="userInfo.face || '/static/missing-face.png'"></u-image>
<div class="whether-point"> <div class="whether-point">
<div>你的可用积分<span class="point">{{userInfo.point || 0}}</span></div> <div>积分<span class="point">{{userInfo.point || 0}}</span></div>
</div> </div>
</div> </div>
</div> </div>
@ -34,9 +34,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.user-point { .user-point {
padding: 0 20rpx; padding: 0 20rpx;
height: 300rpx; height: 200px;
background: url("/static/point-bg.png") no-repeat; background: url("/static/point-bg.png") no-repeat;
background-size: 100%; background-size: 100% 100%;
} }
.point { .point {
font-size: 40rpx; font-size: 40rpx;

View File

@ -202,7 +202,7 @@ export default {
.sale-head { .sale-head {
image { image {
width: 100%; width: 100%;
height: 280rpx; height: 200px;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 366 KiB

View File

@ -66,9 +66,13 @@ export default {
tpl, tpl,
}, },
onReachBottom() { onReachBottom() {
console.log("触底了");
this.$refs.childComp.loadMon(); this.$refs.childComp.loadMon();
}, },
onPullDownRefresh() {
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1000);
},
methods: { methods: {
change(index) { change(index) {
this.current = index; this.current = index;
@ -92,7 +96,7 @@ export default {
} }
::v-deep { ::v-deep {
.u-tabs { .u-tabs {
padding: 25px 20px 0px 20px; padding: 30px 20px 0px 20px;
} }
.u-tab-item { .u-tab-item {
color: $main-color !important; color: $main-color !important;

View File

@ -1,5 +1,5 @@
/** 配置楼层模块的跳转 */ /** 配置楼层模块的跳转 */
export function modelNavigateTo(item) { export function modelNavigateTo(item,ste='') {
let val = item.url; let val = item.url;
switch (val.___type) { switch (val.___type) {
@ -11,7 +11,7 @@ export function modelNavigateTo(item) {
case "category": case "category":
if (val.id) { if (val.id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/navigation/search/searchPage?category=${val.id}`, url: `/pages/navigation/search/searchPage?category=${val.id}&ste=${ste}`,
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="layout"> <div class="layout">
<div class="menu-list"> <div class="menu-list">
<div class="menu-item" @click="modelNavigateTo(item)" v-for="(item, index) in res.list" :key="index"> <div class="menu-item" @click="modelNavigateTo(item,val)" v-for="(item, index) in res.list" :key="index">
<div> <div>
<u-image <u-image
width="88rpx" width="88rpx"
@ -21,12 +21,16 @@
import {modelNavigateTo} from './tpl' import {modelNavigateTo} from './tpl'
export default { export default {
title:"五列菜单", title:"五列菜单",
props: ["res"], props: ["res","val"],
data () { data () {
return { return {
modelNavigateTo, modelNavigateTo,
} }
} },
mounted () {
console.log(this.val,'=========')
// this.$u.toast('Hello uView!');
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="layout"> <div class="layout">
<div class="addres" @click="showPicker" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"> <div class="addres" @click="showPicker">
{{ cityOrCounty == "" ? "请选择" : cityOrCounty }} {{ cityOrCounty == "" ? "请选择" : cityOrCounty }}
</div> </div>
<div class="search" @click="handleSearch">{{ res.list[0].title }}</div> <div class="search" @click="handleSearch">{{ res.list[0].title }}</div>
@ -240,10 +240,13 @@ export default {
} }
.addres { .addres {
// width: 15%; // width: 15%;
width: 60px;
height: 32px; height: 32px;
display: flex; padding: 0px 10px 0px 10px;
justify-content: center; white-space: nowrap;
align-items: center; overflow: hidden;
text-overflow: ellipsis;
line-height: 32px;
} }
.layout { .layout {
// background: #fff; // background: #fff;

View File

@ -7,11 +7,22 @@
@click="handleClick(item)" @click="handleClick(item)"
> >
<div class="pl_img"> <div class="pl_img">
<img :src="imgfun(item.thumbnail)" alt="" width="100" /> <img :src="imgfun(item.thumbnail)" alt="" width="100" height="100"/>
</div> </div>
<div class="right"> <div class="right">
<div>{{ item.goodsName }}</div> <div style="font-size:18px">{{ item.goodsName }}
<div>价格:{{ item.price }}</div> </div>
<div>收藏:{{ item.commentNum }}
</div>
<div class="proice">价格:{{ item.price }}</div>
<div class="flex store-distance">
<div>
<template v-for="i in 5">
<u-icon :name="i <= item.descriptionScore ? 'star-fill' : 'star'" class="proice" size="30"></u-icon>
</template>
</div>
</div>
<div>地址:{{ item.storeAddressPath }}</div> <div>地址:{{ item.storeAddressPath }}</div>
</div> </div>
</div> </div>
@ -123,8 +134,8 @@ export default {
border: 1px solid #eee; border: 1px solid #eee;
display: flex; display: flex;
.pl_img{ .pl_img{
// width: 100px; // width: 100px;
// height: 100px; // height: 100px;
padding: 10px; padding: 10px;
// &>img{ // &>img{
// width: 100%; // width: 100%;
@ -134,6 +145,11 @@ export default {
.right{ .right{
// flex: 1; // flex: 1;
padding: 10px; padding: 10px;
font-size: 12px;
} }
} }
.proice{
color: $light-color;
}
</style> </style>

View File

@ -41,7 +41,7 @@
<flexFour v-if="item.type == 'flexFour'" :res="item.options" /> <flexFour v-if="item.type == 'flexFour'" :res="item.options" />
<flexTwo v-if="item.type == 'flexTwo'" :res="item.options" /> <flexTwo v-if="item.type == 'flexTwo'" :res="item.options" />
<textPicture v-if="item.type == 'textPicture'" :res="item.options" /> <textPicture v-if="item.type == 'textPicture'" :res="item.options" />
<menuLayout v-if="item.type == 'menu'" :res="item.options" /> <menuLayout v-if="item.type == 'menu'" :val="ste" :res="item.options" />
<flexOne v-if="item.type == 'flexOne'" :res="item.options" /> <flexOne v-if="item.type == 'flexOne'" :res="item.options" />
<activity v-if="item.type == 'activity'" :res="item.options" /> <activity v-if="item.type == 'activity'" :res="item.options" />
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" /> <Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
@ -93,7 +93,7 @@ export default {
config, config,
pageData: "", // pageData: "", //
isIos: "", isIos: "",
isload:false isload: false,
}; };
}, },
components: { components: {
@ -148,7 +148,7 @@ export default {
methods: { methods: {
loadMon() { loadMon() {
this.isload=!this.isload this.isload = !this.isload;
// this.$refs.loadMonfn.loadMon(); // this.$refs.loadMonfn.loadMon();
}, },
/** /**
@ -160,12 +160,14 @@ export default {
if (this.ste == 1) { if (this.ste == 1) {
getFloorData().then((res) => { getFloorData().then((res) => {
if (res.data.success) { if (res.data.success) {
console.log("商城数据已加载完成");
this.pageData = JSON.parse(res.data.result.pageData); this.pageData = JSON.parse(res.data.result.pageData);
} }
}); });
} else { } else {
getFloorgetBendi().then((res) => { getFloorgetBendi().then((res) => {
if (res.data.success) { if (res.data.success) {
console.log("本地生活数据已加载完成");
this.pageData = JSON.parse(res.data.result.pageData); this.pageData = JSON.parse(res.data.result.pageData);
} }
}); });
@ -186,7 +188,6 @@ export default {
let path = encodeURIComponent(res.result); let path = encodeURIComponent(res.result);
// WX_CODE // WX_CODE
if (res.scanType == "WX_CODE") { if (res.scanType == "WX_CODE") {
console.log(res);
uni.navigateTo({ uni.navigateTo({
url: `/${res.path}`, url: `/${res.path}`,
}); });

View File

@ -1,47 +1,43 @@
<template> <template>
<div style="height: 100%"> <div style="height: 100%" @click="handleTouchStart">
<div class="jolkp"> <div class="jolkp">
<div <div
class="fan" class="fan"
:style="{ marginRight: statue == 0 ? '50%' : '50%' }" :style="{ marginRight: statue == 0 ? '47.5%' : '47.5%' }"
> >
<div <div
@click="hui(0)" @click="hui(0)"
:style="{ marginTop: '35px', color: '#fff' }" :style="{ marginTop: '45px' }"
v-if="statue == 1 || 6" v-if="statue !=0"
> >
< <u-icon name="arrow-left"></u-icon>
</div> </div>
</div> </div>
<!-- <TUIContact v-else-if="statue==1" :stu="2" /> --> <!-- <TUIContact v-else-if="statue==1" :stu="2" /> -->
<div <div
@click="hui(6)" @click="hui(6)"
class="jolkp_z" class="jolkp_z"
v-if="statue == 0 || 6" v-if="statue == 0 || 6"
:style="{ marginTop: '40px' }" :style="{ marginTop: '45px' }"
> >
<div class="tiole">{{ tole }}</div> <div class="tiole">{{ tole }}</div>
</div> </div>
<div <div
@click="hui(1)" @click="hui(1)"
class="jolkp_h" class="jolkp_h"
v-if="statue == 0 || 6" v-if="statue == 0 || 6"
:style="{ marginTop: '35px' }" :style="{ marginTop: '45px' }"
></div>
<div
@click="fnkiopl"
class="jolkp_l"
:style="{ marginTop: '35px' }"
></div> ></div>
<view class="jolkp_l" :style="{ marginTop: '45px' }"></view>
<!-- 弹出框 --> <!-- 弹出框 -->
<div v-if="isPopupVisible" class="popup" ref="popup"> <view v-if="isPopupVisible" class="popup" ref="popup">
<ul> <ul>
<li @click="handleAddFriend">添加好友/群聊</li> <li @click="handleAddFriend">添加好友/群聊</li>
<li @click="handleMenu()">发起群聊</li> <li @click="handleMenu()">发起群聊</li>
<li @click="handleScan">扫一扫</li> <li @click="handleScan">扫一扫</li>
</ul> </ul>
</div> </view>
</div> </div>
<!-- 搜索添加 --> <!-- 搜索添加 -->
<TUIContactsea v-if="statue == 2" @switchConversation="hui" /> <TUIContactsea v-if="statue == 2" @switchConversation="hui" />
@ -56,6 +52,7 @@
<!-- 群类型 --> <!-- 群类型 -->
<CreateGroup v-else-if="statue == 10" @con="confn" /> <CreateGroup v-else-if="statue == 10" @con="confn" />
<SelectFriendqlioa v-else-if="statue == 4" @concen="concen" /> <SelectFriendqlioa v-else-if="statue == 4" @concen="concen" />
<ContactInfo v-else-if="statue == 7" @concen="concen" />
<!-- 站内信数据 --> <!-- 站内信数据 -->
<!-- <div > --> <!-- <div > -->
<scroll-view <scroll-view
@ -86,13 +83,10 @@
</div> </div>
</scroll-view> </scroll-view>
<!-- </div> --> <!-- </div> -->
<!-- 会话 --> <!-- 会话 -->
<TUIConversation <TUIConversation style="height: 100%" v-else @state="state" />
style="height: 100%" </div>
v-else
/>
</div>
</template> </template>
<script> <script>
@ -105,13 +99,14 @@ import ContactSearch from "@/TUIKit/components/TUIContact/contact-search/index.v
import CreateGroup from "@/TUIKit/components/TUIGroup/create-group/index.vue"; import CreateGroup from "@/TUIKit/components/TUIGroup/create-group/index.vue";
import { TUIChatKit } from "@/TUIKit"; import { TUIChatKit } from "@/TUIKit";
import SelectFriend from "@/TUIKit/components/TUIContact/select-friend/index.vue"; import SelectFriend from "@/TUIKit/components/TUIContact/select-friend/index.vue";
import ContactInfo from "@/TUIKit/components/TUIContact/contact-info/index.vue";
import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue"; import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue";
import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core"; import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core";
import storage from "@/utils/storage.js"; import storage from "@/utils/storage.js";
// push // push
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine'; import { TUIConversationService } from "@tencentcloud/chat-uikit-engine";
import * as Push from '@/uni_modules/TencentCloud-Push'; import * as Push from "@/uni_modules/TencentCloud-Push";
import { import {
getUserimInfo, getUserimInfo,
@ -120,6 +115,16 @@ import {
getMemberdelete, getMemberdelete,
geterweijki, geterweijki,
} from "@/api/members"; } from "@/api/members";
import {
TUITranslateService,
TUIStore,
StoreName,
IGroupModel,
TUIFriendService,
Friend,
FriendApplication,
TUIUserService,
} from "@tencentcloud/chat-uikit-engine";
TUIChatKit.init(); TUIChatKit.init();
let vueVersion = 2; let vueVersion = 2;
// vueVersion = 3; // vueVersion = 3;
@ -135,10 +140,11 @@ export default {
SelectFriendqlioa, SelectFriendqlioa,
TUIChatKit, TUIChatKit,
CreateGroup, CreateGroup,
ContactInfo,
}, },
data() { data() {
return { return {
statue: 0, // 0 1 2/ 3 4 6 statue: 0, // 0 1 2/ 3 4 6 10 7
isPopupVisible: false, // isPopupVisible: false, //
isq: false, isq: false,
popupRef: null, // popupRef: null, //
@ -167,52 +173,56 @@ export default {
userSig: par.userSig, userSig: par.userSig,
useUploadPlugin: true, // If you need to send rich media messages, please set to true. useUploadPlugin: true, // If you need to send rich media messages, please set to true.
framework: `vue${vueVersion}`, // framework used vue2 / vue3 framework: `vue${vueVersion}`, // framework used vue2 / vue3
}).then(()=>{ }).then(() => {
Push.setRegistrationID(par.userID, () => { Push.setRegistrationID(par.userID, () => {
console.log('设置id设置id设置id设置id设置id设置id设置id设置id设置id设置id', par.userID); console.log(
"设置id设置id设置id设置id设置id设置id设置id设置id设置id设置id",
par.userID
);
Push.registerPush( Push.registerPush(
par.sdkAppId, par.sdkAppId,
'vkFpe55aYqfV7Sk5uGaoxhEstJ3tcI9dquk7JwG1GloDSLD2HeMWeQweWWXgNlhC', "vkFpe55aYqfV7Sk5uGaoxhEstJ3tcI9dquk7JwG1GloDSLD2HeMWeQweWWXgNlhC",
(data) => { (data) => {
console.log('registerPush ok', data); console.log("registerPush ok", data);
Push.getRegistrationID((registrationID) => { Push.getRegistrationID((registrationID) => {
console.log('getRegistrationID ok', registrationID); console.log("getRegistrationID ok", registrationID);
}); });
}, },
(errCode, errMsg) => { (errCode, errMsg) => {
console.error('registerPush failed', errCode, errMsg); console.error("registerPush failed", errCode, errMsg);
} }
); );
}); });
// //
Push.addPushListener(Push.EVENT.NOTIFICATION_CLICKED, (res) => { Push.addPushListener(Push.EVENT.NOTIFICATION_CLICKED, (res) => {
console.log('notification clicked', res); console.log("notification clicked", res);
// //
try { try {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
const conv_type = data?.entity?.chatType === 1 ? 'C2C' : 'GROUP'; const conv_type =
// conversationID data?.entity?.chatType === 1 ? "C2C" : "GROUP";
const conversationID = `${conv_type}${data.entity.sender}`; // conversationID
// const conversationID = `${conv_type}${data.entity.sender}`;
TUIConversationService.switchConversation(conversationID); //
const chatPath = '/TUIKit/components/TUIChat/index'; TUIConversationService.switchConversation(conversationID);
uni.navigateTo({ url: chatPath }); const chatPath = "/TUIKit/components/TUIChat/index";
} catch (error) { uni.navigateTo({ url: chatPath });
console.log('error', error); } catch (error) {
} console.log("error", error);
}); }
// 线 });
Push.addPushListener(Push.EVENT.MESSAGE_RECEIVED, (res) => { // 线
// res Push.addPushListener(Push.EVENT.MESSAGE_RECEIVED, (res) => {
console.log('message received', res); // res
}); console.log("message received", res);
// 线 });
Push.addPushListener(Push.EVENT.MESSAGE_REVOKED, (res) => { // 线
// res ID Push.addPushListener(Push.EVENT.MESSAGE_REVOKED, (res) => {
console.log('message revoked', res); // res ID
}); console.log("message revoked", res);
}) });
});
} else { } else {
// 200 // 200
uni.navigateTo({ uni.navigateTo({
@ -227,23 +237,62 @@ export default {
}); });
}); });
}, },
mounted() { mounted() {
this.getMembermethod(); this.getMembermethod();
this.setTime(); this.setTime();
//
document.addEventListener("click", (event) => //
this.handleGlobalClick(event) uni.$on("globalClick", (event) => {
); // console.log(event, "====+++");
// this.handleGlobalClick(event);
});
// //
// uni.onTouchStart((event) => {
// uni.$emit("globalClick", event);
// });
}, },
beforeDestroy() { beforeDestroy() {
// //
document.removeEventListener("click", this.handleGlobalClick); uni.$off("globalClick");
// //
clearTimeout(this.cleartime); clearTimeout(this.cleartime);
//
}, },
methods: { methods: {
state(item) {
this.isPopupVisible = item;
},
handleTouchStart(event) {
uni.$emit("globalClick", event);
},
handleGlobalClick(event) {
const query = uni.createSelectorQuery().in(this);
query
.select(".jolkp_l")
//
.boundingClientRect((rect) => {
if (rect) {
const clickX = event.clientX || event.touches[0].clientX;
const clickY = event.clientY || event.touches[0].clientY;
if (clickX >= rect.left && clickX <= rect.width+rect.left
&& clickY >= rect.top && clickY <= rect.top + rect.height*2) {
// this.statue = 0; //
console.log("点击是在节点范围");
this.isPopupVisible = !this.isPopupVisible; //
}else{
// this.statue = 0; //
console.log("否");
this.isPopupVisible = false; //
}
}
})
//
.exec(() => {
// this.isPopupVisible = true; //
});
},
lowerBottom() { lowerBottom() {
if (this.total >= this.meList.length) { if (this.total >= this.meList.length) {
this.pageSize += 10; this.pageSize += 10;
@ -258,7 +307,7 @@ export default {
}, 10000); }, 10000);
}, },
torut(item) { torut(item) {
// item JSON 便 URL this.isPopupVisible = false;
const itemJson = encodeURIComponent(JSON.stringify(item)); const itemJson = encodeURIComponent(JSON.stringify(item));
// 使 uni.navigateTo // 使 uni.navigateTo
uni.navigateTo({ uni.navigateTo({
@ -283,11 +332,6 @@ export default {
this.isPopupVisible = !this.isPopupVisible; this.isPopupVisible = !this.isPopupVisible;
this.popupRef = this.$refs.popup; this.popupRef = this.$refs.popup;
}, },
handleGlobalClick(event) {
if (this.isPopupVisible && event.target._prevClass != "jolkp_l") {
this.isPopupVisible = false;
}
},
getMembermethod() { getMembermethod() {
const param = { const param = {
@ -331,18 +375,13 @@ export default {
this.isPopupVisible = false; this.isPopupVisible = false;
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
console.log("扫码结果:---", res); console.log("扫码结果:---", res.result);
geterweijki(res.result).then((resfn) => { const params = {
console.log(resfn, "===="); userID: res.result, //userID
this.getUserimInfo(); };
this.statue = 0; console.log("params", params);
}); TUIStore.update(StoreName.CUSTOM, "currentContactInfo", params);
this.statue = 0; this.statue = 7;
//
},
fail: (err) => {
console.error("扫码失败:", err);
this.statue = 0;
}, },
}); });
}, },
@ -373,152 +412,152 @@ uni-page-body,
html, html,
body, body,
page { page {
width: 100% !important; width: 100% !important;
height: 100% !important; height: 100% !important;
overflow: hidden; overflow: hidden;
} }
.jolkp { .jolkp {
height: 66px; height: 75px;
display: flex; display: flex;
font-size: 15px; font-size: 15px;
justify-content: end; justify-content: end;
/* 设置背景图 */ /* background: green; */
background-image: url('@/static/im/Rectangle.png'); /* 设置背景图 */
/* 让背景图覆盖整个元素 */ /* background-image: url('@/static/im/Rectangle.png'); */
background-size: cover; /* 让背景图覆盖整个元素 */
/* 背景图不重复 */ background-size: cover;
background-repeat: no-repeat; /* 背景图不重复 */
background-repeat: no-repeat;
} }
.jolkp_l { .jolkp_l {
width: 2rem; width: 1.8rem;
height: 2rem; height: 1.8rem;
background-image: url('@/static/im/Frame.png'); background-image: url("@/static/im/Frame.png");
/* 让背景图覆盖整个元素 */ /* 让背景图覆盖整个元素 */
background-size: cover; background-size: cover;
/* 背景图不重复 */ /* 背景图不重复 */
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 35px; margin-top: 35px;
margin-right: 10px; margin-right: 10px;
} }
.jolkp_h { .jolkp_h {
width: 2rem; width: 1.8rem;
height: 2rem; height: 1.8rem;
background-image: url('@/static/im/user.png'); background-image: url("@/static/im/user.png");
/* 让背景图覆盖整个元素 */ /* 让背景图覆盖整个元素 */
background-size: cover; background-size: cover;
/* 背景图不重复 */ /* 背景图不重复 */
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 35px; margin-top: 35px;
margin-right: 20px; margin-right: 20px;
} }
.jolkp_z { .jolkp_z {
width: 2rem; width: 1.8rem;
height: 1.5rem; height: 1.8rem;
background-image: url('@/static/im/znx.png'); background-image: url("@/static/im/znx.png");
/* 让背景图覆盖整个元素 */ /* 让背景图覆盖整个元素 */
background-size: cover; background-size: cover;
/* 背景图不重复 */ /* 背景图不重复 */
background-size: 100% 100%; background-size: 100% 100%;
margin-top: 35px; margin-right: 20px;
margin-right: 20px;
} }
.tiole { .tiole {
margin-top: -10px; margin-top: -10px;
margin-left: 105%; margin-left: 105%;
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
} }
.popup { .popup {
position: absolute; position: absolute;
top: 65px; top: 75px;
/* 调整弹出框的位置 */ /* 调整弹出框的位置 */
right: 5px; right: 5px;
background-color: #fff; background-color: #fff;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
z-index: 3; z-index: 3;
} }
.popup ul { .popup ul {
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.popup li { .popup li {
padding: 10px 20px; padding: 10px 20px;
cursor: pointer; cursor: pointer;
} }
.popup li:hover { .popup li:hover {
background-color: #f0f0f0; background-color: #f0f0f0;
} }
.fan { .fan {
width: 10%; width: 10%;
height: '100%'; height: "100%";
font-size: 18px; font-size: 18px;
display: flex; display: flex;
padding: 5px; padding: 5px;
} }
@media screen and (device-width: 393px) and (device-height: 851px) and (-webkit-device-pixel-ratio: 3) { @media screen and (device-width: 393px) and (device-height: 851px) and (-webkit-device-pixel-ratio: 3) {
.fan { .fan {
margin-right: 56% !important; margin-right: 56% !important;
width: 10%; width: 10%;
height: '100%'; height: "100%";
font-size: 18px; font-size: 18px;
display: flex; display: flex;
margin-top: 85%; margin-top: 80%;
padding: 5px; /* padding: 5px; */
} }
} }
.three { .three {
width: 100%; width: 100%;
height: 10%; height: 10%;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
} }
.con { .con {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.three_div1 { .three_div1 {
height: 3rem; height: 3rem;
width: 40%; width: 40%;
background-image: url('@/static/im/kf.png'); background-image: url("@/static/im/kf.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: end;
} }
.three_div2 { .three_div2 {
width: 40%; width: 40%;
height: 3rem; height: 3rem;
background-image: url('@/static/im/hy.png'); background-image: url("@/static/im/hy.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 40%; width: 40%;
} }
.three_div3 { .three_div3 {
height: 3rem; height: 3rem;
background-image: url('@/static/im/da.png'); background-image: url("@/static/im/da.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 40%; width: 40%;
} }
.tui-conversation-item { .tui-conversation-item {
/* height: 10%; */ /* height: 10%; */
@ -534,39 +573,38 @@ page {
position: relative; position: relative;
} }
.content { .content {
display: flex; display: flex;
flex: 1; flex: 1;
padding-left: 8px; padding-left: 8px;
justify-content: end; justify-content: end;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
} }
.left { .left {
position: relative; position: relative;
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
.znx { .znx {
max-height: 100vh; max-height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow-y: auto; overflow-y: auto;
} }
.delete-button { .delete-button {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 100px; width: 100px;
background-color: red; background-color: red;
color: white; color: white;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -10,15 +10,20 @@
</view> </view>
<view class="head-2" v-if="userInfo.id"> <view class="head-2" v-if="userInfo.id">
<view class="user-name">{{ userInfo.nickName }}</view> <view class="user-name">{{ userInfo.nickName }}</view>
<view class="user-logn" v-if="ismongt.expert">
<view class="mong"></view>
<view>达人</view>
</view>
</view> </view>
<view class="head-2" v-else> <view class="head-2" v-else>
<view class="user-name">登录/注册</view> <view class="user-name">登录/注册</view>
</view> </view>
<u-icon <!-- <u-icon
style="display: flex; align-items: flex-start" style="display: flex; align-items: flex-start"
name="arrow-right" name="arrow-right"
></u-icon> ></u-icon> -->
</view> </view>
<!-- 积分优惠券关注 --> <!-- 积分优惠券关注 -->
<div class="pointBox box"> <div class="pointBox box">
@ -101,13 +106,15 @@
</div> </div>
<!-- 常用工具 --> <!-- 常用工具 -->
<tool :userInfo="userInfo" v-if="userInfo.id != undefined" ref="tool"/> <tool :userInfo="userInfo" v-if="userInfo.id != undefined" ref="tool" />
</view> </view>
</template> </template>
<script> <script>
import tool from "@/pages/tabbar/user/utils/tool.vue"; import tool from "@/pages/tabbar/user/utils/tool.vue";
import { getCouponsNum, getFootprintNum } from "@/api/members.js"; import { getCouponsNum, getFootprintNum } from "@/api/members.js";
import { getUserWallet } from "@/api/members"; import { getUserWallet } from "@/api/members";
import Views from "../home/views.vue";
import { getUserInfo } from "@/api/members";
export default { export default {
components: { components: {
tool, tool,
@ -121,10 +128,14 @@ export default {
couponNum: "", couponNum: "",
footNum: "", footNum: "",
walletNum: "", walletNum: "",
ismongt: {},
}; };
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
// if(this.ismongt.expert=='undefined'){
this.getUser()
// }
this.userInfo = this.$options.filters.isLogin(); this.userInfo = this.$options.filters.isLogin();
if (this.$options.filters.isLogin("auth")) { if (this.$options.filters.isLogin("auth")) {
this.getUserOrderNum(); this.getUserOrderNum();
@ -134,9 +145,9 @@ export default {
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getUserOrderNum(); this.getUserOrderNum();
this.getUser()
this.userInfo = this.$options.filters.isLogin(); this.userInfo = this.$options.filters.isLogin();
this.$refs.tool.getUser(); this.$refs.tool.getUser();
}, },
// #ifndef MP // #ifndef MP
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -149,6 +160,12 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getUser() {
this.ismongt = {}
getUserInfo().then((user) => {
this.ismongt = user.data.result;
});
},
/** /**
* 统一跳转接口,拦截未登录路由 * 统一跳转接口,拦截未登录路由
* navigator标签现在默认没有转场动画所以用view * navigator标签现在默认没有转场动画所以用view
@ -236,7 +253,7 @@ body {
.head-2 { .head-2 {
flex: 1; flex: 1;
margin-left: 30rpx; margin-left: 30rpx;
margin-top: 100rpx; margin-top: 80rpx;
line-height: 1; line-height: 1;
} }
/deep/ .u-icon, /deep/ .u-icon,
@ -298,7 +315,19 @@ body {
.user-name { .user-name {
font-size: 34rpx; font-size: 34rpx;
} }
.user-logn {
display: flex;
align-items: center;
margin: 15px 15px 0px 0px;
font-size: 15px;
.mong{
width: 1rem;
height:1rem;
background: url("@/static/mon.png") no-repeat;
background-size: 100% 100%;
}
}
.bag { .bag {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
static/mon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 177 KiB

View File

@ -17,41 +17,30 @@ function cleanStorage() {
uni.hideLoading(); uni.hideLoading();
} }
storage.setHasLogin(false); storage.setHasLogin(false);
storage.setAccessToken(""); storage.setAccessToken("");
storage.setRefreshToken(""); storage.setRefreshToken("");
console.log("清空token"); storage.setUuid("");
storage.setUuid(""); storage.setUserInfo({});
storage.setUserInfo({}); // 清理vlog信息
// 清理vlog信息 storage.setVlogToken("");
storage.setVlogToken("") storage.setVlogUserInfo(null);
storage.setVlogUserInfo(null) // 清除初始化数据内容
// 清除初始化数据内容 storage.setRefreshVlogIndex("0"); //不需要刷新
storage.setRefreshVlogIndex('0') //不需要刷新 // 获取当前页面栈
// 防抖处理跳转
// #ifdef MP-WEIXIN
uni.navigateTo({
url: "/pages/passport/wechatMPLogin",
});
// #endif
// #ifndef MP-WEIXIN
const pages = getCurrentPages(); const pages = getCurrentPages();
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
const currentRoute = currentPage.route; const currentRoute = currentPage.route;
console.log(currentRoute,'==='); // 防抖处理跳转
// #ifdef MP-WEIXIN
setTimeout(() => { if (currentRoute !== 'pages/passport/wechatMPLogin') {
uni.navigateTo({ uni.navigateTo({ url: "/pages/passport/wechatMPLogin" });
url: "/pages/passport/login", }
}); // #endif
}, 5000); // #ifndef MP-WEIXIN
if (currentRoute !== 'pages/passport/login') {
uni.navigateTo({ url: "/pages/passport/login" });
}
// #endif // #endif
} }
@ -95,29 +84,25 @@ http.interceptors.request.use(
..._params, ..._params,
}; };
config.params = params; config.params = params;
config.header.accessToken = accessToken; config.header.accessToken = accessToken;
}
} // 配置vlog所需参数
// 配置vlog所需参数 let vlogToken = storage.getVlogToken();
let vlogToken = storage.getVlogToken(); let vlogId = storage.getVlogUserInfo();
let vlogId = storage.getVlogUserInfo(); if (vlogToken) {
// console.log(vlogId) config.header.headerUserToken = vlogToken;
// console.log(vlogToken) config.header.headerUserId = vlogId.id;
if (vlogToken) { }
config.header.headerUserToken = vlogToken; config.header = {
config.header.headerUserId = vlogId.id; ...config.header,
} uuid: storage.getUuid() || uuid.v1(),
config.header = { };
...config.header, return config;
uuid: storage.getUuid() || uuid.v1(), },
}; (config) => {
// console.log(config) return Promise.reject(config);
return config; }
},
(config) => {
return Promise.reject(config);
}
); );
// 是否正在刷新的标记 // 是否正在刷新的标记
@ -126,15 +111,15 @@ let isRefreshing = false;
let requests = []; let requests = [];
// 必须使用异步函数,注意 // 必须使用异步函数,注意
http.interceptors.response.use( http.interceptors.response.use(
async (response) => { async (response) => {
// console.log(isRefreshing) // console.log(isRefreshing)
// console.log(response) // console.log(response)
/* 请求之后拦截器。可以使用async await 做异步操作 */ /* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期 // token存在并且token过期
if (isRefreshing && response.statusCode === 403) { if (isRefreshing && response.statusCode === 403) {
cleanStorage(); cleanStorage();
isRefreshing = false; isRefreshing = false;
} }
let token = storage.getAccessToken(); let token = storage.getAccessToken();
if ( if (
@ -181,26 +166,26 @@ http.interceptors.response.use(
) { ) {
cleanStorage(); cleanStorage();
// 如果当前状态码为正常但是success为不正常时 // 如果当前状态码为正常但是success为不正常时
} else if ( } else if (
(response.statusCode == 200 && !response.data.success) || (response.statusCode == 200 && !response.data.success) ||
response.statusCode == 400 response.statusCode == 400
) { ) {
if (response.data.message) { if (response.data.message) {
uni.showToast({ uni.showToast({
title: response.data.message, title: response.data.message,
icon: "none", icon: "none",
duration: 1500, duration: 1500,
}); });
} }
} else if (response.data.code == 502) { } else if (response.data.code == 502) {
cleanStorage(); cleanStorage();
} }
return response; return response;
}, },
(error) => { (error) => {
return error; return error;
} }
); );
export { http }; export { http };