|
@@ -193,6 +193,41 @@
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</view>
|
|
</view>
|
|
|
</wd-popup>
|
|
</wd-popup>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 专属客服 -->
|
|
|
|
|
+ <wd-popup
|
|
|
|
|
+ v-model="serviceShow"
|
|
|
|
|
+ position="center"
|
|
|
|
|
+ closable
|
|
|
|
|
+ root-portal
|
|
|
|
|
+ lock-scroll
|
|
|
|
|
+ custom-style="width: 580rpx; border-radius: 24rpx; overflow: hidden; background: #ffffff;"
|
|
|
|
|
+ @close="serviceShow = false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="service-dialog">
|
|
|
|
|
+ <view class="service-dialog-title">专属客服</view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="service-dialog-image-wrap">
|
|
|
|
|
+ <image
|
|
|
|
|
+ v-if="serviceImgSrc"
|
|
|
|
|
+ class="service-dialog-image"
|
|
|
|
|
+ :src="serviceImgSrc"
|
|
|
|
|
+ mode="aspectFit"
|
|
|
|
|
+ :show-menu-by-longpress="true"
|
|
|
|
|
+ />
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="service-dialog-save"
|
|
|
|
|
+ :class="{ 'is-saving': serviceSaving }"
|
|
|
|
|
+ hover-class="service-dialog-save--hover"
|
|
|
|
|
+ @click="saveServiceQrCode"
|
|
|
|
|
+ >
|
|
|
|
|
+ <wd-icon v-if="!serviceSaving" name="download" color="#ffffff" size="34rpx" />
|
|
|
|
|
+ <text>{{ serviceSaving ? '保存中...' : '保存二维码' }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </wd-popup>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -202,10 +237,12 @@ import { computed, ref } from 'vue'
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
|
|
+ getDeptCsmApi,
|
|
|
getInternalMsgCountUnreadApi,
|
|
getInternalMsgCountUnreadApi,
|
|
|
taxLocationEntranceApi,
|
|
taxLocationEntranceApi,
|
|
|
} from '@/services/modules/mine/common'
|
|
} from '@/services/modules/mine/common'
|
|
|
|
|
|
|
|
|
|
+import { useSaveToAlbum } from '@/composables/photo/useSaveToAlbum'
|
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
|
|
|
|
|
|
import { functionList, menuList, rolesList } from './mine.config'
|
|
import { functionList, menuList, rolesList } from './mine.config'
|
|
@@ -227,6 +264,11 @@ const showOSAIS = computed(() => {
|
|
|
|
|
|
|
|
const hasUnreadNotification = ref(false)
|
|
const hasUnreadNotification = ref(false)
|
|
|
const handleCompanyShow = ref(false)
|
|
const handleCompanyShow = ref(false)
|
|
|
|
|
+const serviceShow = ref(false)
|
|
|
|
|
+const serviceImgSrc = ref('')
|
|
|
|
|
+const serviceSaving = ref(false)
|
|
|
|
|
+
|
|
|
|
|
+const { saveBase64ToAlbum } = useSaveToAlbum()
|
|
|
|
|
|
|
|
const companyList = computed(() => {
|
|
const companyList = computed(() => {
|
|
|
const currentIndex = userStore.currentUserInfoIndex ?? 0
|
|
const currentIndex = userStore.currentUserInfoIndex ?? 0
|
|
@@ -362,7 +404,41 @@ const navigateToSettlementChannelSign = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const openService = async () => {
|
|
|
|
|
+ if (!checkBeforeNavigate()) return
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ const arrayBuffer = await getDeptCsmApi()
|
|
|
|
|
+ serviceImgSrc.value = `data:image/jpeg;base64,${uni.arrayBufferToBase64(arrayBuffer)}`
|
|
|
|
|
+ serviceShow.value = true
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取专属客服失败:', error)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const saveServiceQrCode = async () => {
|
|
|
|
|
+ if (!serviceImgSrc.value || serviceSaving.value) return
|
|
|
|
|
+
|
|
|
|
|
+ serviceSaving.value = true
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ await saveBase64ToAlbum(serviceImgSrc.value)
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('保存专属客服二维码失败:', error)
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '保存失败,请稍后重试',
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ })
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ serviceSaving.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const functionListClick = (item: { key: string; txt: string; icon: string; path?: string }) => {
|
|
const functionListClick = (item: { key: string; txt: string; icon: string; path?: string }) => {
|
|
|
|
|
+ if (item.key === 'service') {
|
|
|
|
|
+ openService()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
navigateTo(item.path)
|
|
navigateTo(item.path)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -764,4 +840,65 @@ const handleLogoutClick = () => {
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ height: 850rpx;
|
|
|
|
|
+ padding: 42rpx 40rpx 42rpx;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-title {
|
|
|
|
|
+ color: var(--font-color-333);
|
|
|
|
|
+ font-size: 34rpx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ line-height: 48rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-image-wrap {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ padding: 18rpx 0;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-image {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ width: 440rpx;
|
|
|
|
|
+ height: 560rpx;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-save {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ width: 390rpx;
|
|
|
|
|
+ height: 82rpx;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ border-radius: 14rpx;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ background: #20a4dc;
|
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ line-height: 42rpx;
|
|
|
|
|
+ box-shadow: 0 10rpx 24rpx rgba(32, 164, 220, 0.2);
|
|
|
|
|
+
|
|
|
|
|
+ text {
|
|
|
|
|
+ margin-left: 8rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-save--hover {
|
|
|
|
|
+ opacity: 0.9;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.service-dialog-save.is-saving {
|
|
|
|
|
+ opacity: 0.65;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|