增加跳转企业微信客服示例
This commit is contained in:
@@ -2,11 +2,9 @@
|
||||
<view class="content min-page bg-f7">
|
||||
<view class="contentbox">
|
||||
<template v-if="shopExtend.length">
|
||||
<image class="bg" :src="shopExtend[0].value" mode="aspectFill"
|
||||
v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
||||
<image class="bg" :src="shopExtend[0].value" mode="aspectFill" v-if="!isJsonArrayString(shopExtend[0].value)"></image>
|
||||
<swiper class="swiper" autoplay circular v-else>
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)"
|
||||
:key="index">
|
||||
<swiper-item class="swiper-item" v-for="(item, index) in JSON.parse(shopExtend[0].value)" :key="index">
|
||||
<image class="swiper-bg" :src="item"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@@ -29,7 +27,7 @@
|
||||
<image :src="imgs.code" class="code"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <button type="primary" @click="openContact">打开客服</button> -->
|
||||
<view class="new-menus-box">
|
||||
<view class="new-menus layout2" v-if="allConfig.takeout">
|
||||
<view class="diner" @click="scanCodehandle(0)">
|
||||
@@ -60,7 +58,6 @@
|
||||
|
||||
<view class="u-font-28 color-999">一键分享,快速拼单</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="points" @click="toIntegralMall">
|
||||
@@ -123,23 +120,31 @@
|
||||
|
||||
<script setup>
|
||||
import attractPopup from '@/components/attract-popup.vue';
|
||||
import {
|
||||
homeData
|
||||
} from '@/common/api/market/index.js';
|
||||
import {
|
||||
getMemberConfig,
|
||||
getRechargeConfig
|
||||
} from '@/common/api/index/index.js';
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
defineProps,
|
||||
defineEmits,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
isJsonArrayString
|
||||
} from '@/utils/util.js';
|
||||
import { homeData } from '@/common/api/market/index.js';
|
||||
import { getMemberConfig, getRechargeConfig } from '@/common/api/index/index.js';
|
||||
import { ref, reactive, defineProps, defineEmits, onMounted } from 'vue';
|
||||
import { isJsonArrayString } from '@/utils/util.js';
|
||||
|
||||
function openContact() {
|
||||
wx.openCustomerServiceChat({
|
||||
corpId: 'wwc76ab19fa6df267f',
|
||||
extInfo: {
|
||||
url: 'https://work.weixin.qq.com/kfid/kfc40ac2dc5e20c2e8e'
|
||||
},
|
||||
// 成功回调
|
||||
success: (res) => {
|
||||
console.log('跳转企业微信客服成功', res);
|
||||
},
|
||||
// 失败回调
|
||||
fail: (err) => {
|
||||
console.error('跳转企业微信客服失败', err);
|
||||
uni.showToast({
|
||||
title: '跳转客服失败,请稍后重试',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const attractPopupRef = ref(null);
|
||||
|
||||
@@ -167,7 +172,7 @@
|
||||
function toGroupBuying() {
|
||||
uni.navigateTo({
|
||||
url: '/groupBuying/index/index'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function toFenxiao() {
|
||||
@@ -182,12 +187,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
import {
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import { productStore } from '@/stores/user.js';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
|
||||
// 显示弹窗
|
||||
const popupShow = ref(false);
|
||||
@@ -215,7 +216,7 @@
|
||||
function toTaocan() {
|
||||
uni.navigateTo({
|
||||
url: '/userPackage/index/index'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
const memberindex = (url) => {
|
||||
@@ -301,7 +302,7 @@
|
||||
function getHomeData() {
|
||||
homeData().then((res) => {
|
||||
Object.assign(allConfig, res);
|
||||
imgs.defaultAvatar = res.userAvatar ? res.userAvatar : imgs.defaultAvatar
|
||||
imgs.defaultAvatar = res.userAvatar ? res.userAvatar : imgs.defaultAvatar;
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
@@ -544,7 +545,8 @@
|
||||
background: #ededed;
|
||||
}
|
||||
|
||||
.takeout {}
|
||||
.takeout {
|
||||
}
|
||||
}
|
||||
|
||||
&.layout1 {
|
||||
|
||||
Reference in New Issue
Block a user