客服
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/unpackage/
|
/unpackage/
|
||||||
|
/uni_modules/
|
||||||
41
package.json
41
package.json
@@ -1,19 +1,26 @@
|
|||||||
{
|
{
|
||||||
"id": "mosowe-rotary-table-compatible",
|
"id": "mosowe-rotary-table-compatible",
|
||||||
"name": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
"name": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
||||||
"displayName": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
"displayName": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
"description": "抽奖转盘,非固定图片,可自定义传入奖项列表,v2 v3兼容",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"抽奖",
|
"抽奖",
|
||||||
"转盘",
|
"转盘",
|
||||||
"转盘抽奖",
|
"转盘抽奖",
|
||||||
"轮盘抽奖"
|
"轮盘抽奖"
|
||||||
],
|
],
|
||||||
"dcloudext": {
|
"dcloudext": {
|
||||||
"category": [
|
"category": [
|
||||||
"前端组件",
|
"前端组件",
|
||||||
"通用组件"
|
"通用组件"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"uview-plus": "^3.3.62"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"pinia-plugin-unistorage": "^0.1.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,74 +1,118 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="card">
|
<view v-if="info.value == 4">
|
||||||
<view class="title">
|
<web-view :src="info.url"></web-view>
|
||||||
<view class="t1">添加客服微信咨询</view>
|
</view>
|
||||||
<view class="t2">{{ info.wx }}</view>
|
<view class="" v-else>
|
||||||
|
<view class="card" v-if="info.value == 1">
|
||||||
|
<view class="title">
|
||||||
|
<view class="t1">添加客服微信咨询</view>
|
||||||
|
<view class="t2">{{ info.wx }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<image class="img" :src="info.qrcode" mode="widthFix" @click="checkQrcode"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="card" v-if="info.value == 2">
|
||||||
<image class="img" :src="info.qrcode" mode="widthFix" @click="checkQrcode"></image>
|
<view class="title">
|
||||||
|
<view class="t1">添加客服微信咨询</view>
|
||||||
|
<view class="t2">{{ info.wx }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<image class="img" :src="info.qrcode" mode="widthFix" @click="checkQrcode"></image>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
import {
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
ref,
|
||||||
import { commonType } from '@/api/me/me.js';
|
reactive
|
||||||
|
} from 'vue';
|
||||||
const info = ref({});
|
import {
|
||||||
async function commonTypeAjax() {
|
onLoad
|
||||||
try {
|
} from '@dcloudio/uni-app';
|
||||||
const res1 = await commonType(205);
|
import {
|
||||||
const res2 = await commonType(207);
|
commonType
|
||||||
info.value.wx = res2.value;
|
} from '@/api/me/me.js';
|
||||||
info.value.qrcode = res1.value;
|
const info = ref({});
|
||||||
} catch (error) {
|
async function commonTypeAjax() {
|
||||||
console.log(error);
|
try {
|
||||||
|
const Ttype = await commonType(202);
|
||||||
|
// "客服配置 1 二维码客服 2 微信公众号客服 3电话客服 4外链 ",
|
||||||
|
info.value.value = Ttype.value
|
||||||
|
switch (info.value.value) {
|
||||||
|
case '1':
|
||||||
|
const res1 = await commonType(205);
|
||||||
|
const res2 = await commonType(207);
|
||||||
|
info.value.wx = res2.value;
|
||||||
|
info.value.qrcode = res1.value;
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
console.log('wu')
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber: uni.getStorageSync('kefuPhone') //仅为示例
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
info.value.url = uni.getStorageSync('kefuPhone')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 预览二维码
|
// 预览二维码
|
||||||
function checkQrcode() {
|
function checkQrcode() {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [info.value.qrcode]
|
urls: [info.value.qrcode]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
commonTypeAjax();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
onLoad(() => {
|
|
||||||
commonTypeAjax();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
.container {
|
|
||||||
padding: 28upx;
|
.container {
|
||||||
}
|
padding: 28upx;
|
||||||
.card {
|
}
|
||||||
padding: 28upx;
|
|
||||||
border-radius: 20upx;
|
.card {
|
||||||
background-color: #fff;
|
padding: 28upx;
|
||||||
.title {
|
border-radius: 20upx;
|
||||||
display: flex;
|
background-color: #fff;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
.title {
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
.t1 {
|
align-items: center;
|
||||||
color: #555;
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.t1 {
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding-top: 28upx;
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding-top: 28upx;
|
|
||||||
.img {
|
|
||||||
width: 100%;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user