Commit 1d69e533 authored by geruidan's avatar geruidan

客服

parent dd95003c
......@@ -3,7 +3,7 @@
*/
// export const BASE_URL = 'http://172.18.0.229:9001' //后台根域名 https://demo.shopro.top
export const BASE_URL = 'https://wx.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
// export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
export const API_URL = `${BASE_URL}/api/a1/` //后台接口域名
export const IMG_URL = 'http://file.shopro.top' //全局网络图片地址变量,css背景图片地址变量在uni.scss
......
......@@ -48,8 +48,7 @@
"iosStyle" : "common",
"useOriginalMsgbox" : true
}
},
"nativePlugins" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
......@@ -58,7 +57,7 @@
"appid" : "wx60c6530c49c52ff7",
"setting" : {
"urlCheck" : true,
"minified" : true,
"minified" : false,
"es6" : false,
"postcss" : true
},
......@@ -68,7 +67,7 @@
"desc" : "获取您的信息位置"
}
},
"functionalPages":true,
"functionalPages":true,
"plugins" : {
"myPlugin": {
"version": "1.8.5",
......
......@@ -4,13 +4,7 @@
"^mpShop-(.*)": "@/components/mpShop-$1/mpShop-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/public/kefu",
"style": {
"navigationBarTitleText": "客服",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/index/defalutScreen",
"name": "defalutScreen",
......@@ -36,23 +30,7 @@
},
"name": "index"
},
{
"path": "pages/h5/index",
"name": "h5",
"style": {
"navigationBarTitleText": "loading",
"enablePullDownRefresh": false
}
},
{
"path": "pages/h5/pay",
"name": "pay",
"style": {
"navigationBarTitleText": "收银台",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/cart",
"name": "cart",
......@@ -69,56 +47,89 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/public/conceal",
"style": {
"navigationBarTitleText": "用户隐私协议",
"enablePullDownRefresh": false
}
},
{
"path": "pages/public/user",
"style": {
"navigationBarTitleText": "用户服务协议",
"enablePullDownRefresh": false
}
}
},
{
"path": "pages/h5/bindPh",
"style": {
"navigationBarTitleText": "立即绑定",
"enablePullDownRefresh": false
}
],
"subPackages": [{
"root": "pages/h5",
"pages": [{
"path": "bindPh",
"name": "bindPh",
"style": {
"navigationBarTitleText": "立即绑定",
"enablePullDownRefresh": false
}
}, {
"path": "detail",
"name": "detail",
"style": {
"navigationBarTitleText": "京东比价",
"enablePullDownRefresh": false
}
}, {
"path": "pay",
"name": "pay",
"style": {
"navigationBarTitleText": "收银台",
"enablePullDownRefresh": false
}
}, {
"path": "index",
"name": "index",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": false
}
}]
},
{
"path": "pages/h5/detail",
"style": {
"navigationBarTitleText": "京东比价",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/enterprise",
"name": "enterprise",
"style": {
"navigationBarTitleText": "选择企业",
"enablePullDownRefresh": false
}
"root": "pages/user",
"pages": [{
"path": "enterprise",
"name": "enterprise",
"style": {
"navigationBarTitleText": "选择企业",
"enablePullDownRefresh": false
}
}, {
"path": "register/index",
"name": "register",
"style": {
"navigationBarTitleText": "注册",
"enablePullDownRefresh": false
}
}]
},
{
"path": "pages/user/register/index",
"name": "register",
"style": {
"navigationBarTitleText": "注册",
"enablePullDownRefresh": false
}
"root": "pages/public",
"pages": [{
"path": "conceal",
"name": "conceal",
"style": {
"navigationBarTitleText": "用户隐私协议",
"enablePullDownRefresh": false
}
}, {
"path": "user",
"name": "user",
"style": {
"navigationBarTitleText": "用户服务协议",
"enablePullDownRefresh": false
}
}, {
"path": "callCenter",
"name": "callCenter",
"style": {
"navigationBarTitleText": "加载中...",
"navigationBarTextStyle": "black"
}
}]
}
],
"subPackages": [],
],
"tabBar": {
"color": "#626262",
"selectedColor": "#00c791",
......@@ -140,7 +151,9 @@
"preloadRule": {
"pages/index/index": {
"network": "all",
"packages": []
"packages": [
"pages/h5", "pages/user", "pages/public"
]
}
},
"globalStyle": {
......@@ -149,22 +162,22 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#ffffff"
},
// "condition": { //模式配置,仅开发期间生效
// "current": 0, //当前激活的模式(list 的索引项)
// "list": [
// // {
// // "name": "defalutScreen", //模式名称
// // "path": "pages/index/defalutScreen", //启动页面,必选
// // "query": "companyId=999999998"
// // }
// // {
// // "name": "register", //模式名称
// // "path": "pages/user/register/index", //启动页面,必选
// // "query": "reqisterPageType=1"
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [
// {
// "name": "callCenter", //模式名称
// "path": "pages/public/callCenter", //启动页面,必选
// "query": ""
// }
// {
// "name": "register", //模式名称
// "path": "pages/user/register/index", //启动页面,必选
// "query": "reqisterPageType=1"
// // }
// ]
// },
// }
]
},
"lazyCodeLoading": "requiredComponents"
}
\ No newline at end of file
<template>
<view class="we-run-page">
<view class="contant">
<image src="../../static/img/run/bg.png" class="bg" mode="widthFix"></image>
<image src="https://img.zhonghuihaotai.com/file_20230816170416eDXgX.png" class="bg" mode="widthFix"></image>
<view class="we-run-container">
<image src="../../static/img/run/runBg.png" class="run-logo" mode="widthFix"></image>
<view class="run-step-number">
......
<template>
<view class="call-center">
<!-- <navigator url="plugin://myPlugin/chat">
联系客服
</navigator> -->
<!-- <div @click="sendMsg">
</div> -->
加载中...
</view>
</template>
<script>
import {
APP_ID,
APP_KEY
} from "@/env"
import http from '@/shopro/request/index';
export default {
data() {
return {
userInfo:{
userId:""//用户id
},
groupID:""//客服id
}
},
methods: {
sendMsg() {
var myPluginInterface = requirePlugin('myPlugin');
myPluginInterface.__configAppId(APP_ID); // 不是微信的appId,ID为七鱼后台该小程序设置的APPID(可能是默认随机生成或自定义的)
myPluginInterface._$configAppKey(APP_KEY); // 申请企业的appKey
http('public.userInfo', {}).then(res => {
if (!res.code && res.data) {
console.log(res)
this.userInfo.userId = res.data.u // 用户id
this.groupID = res.data.sid //客服id
myPluginInterface._$configTitle('客服'); //设置客服聊天窗口标题
myPluginInterface._$setUserInfo(this.userInfo); //上报用户信息
myPluginInterface._$configStaffId(this.groupID);//分配客服
// myPluginInterface._$configProduct(product); //配置商品信息
// myPluginInterface._$sendProduct(product); //自动发送
wx.redirectTo({ //跳转到客服聊天界面
url: 'plugin://myPlugin/chat'
})
}else{
this.$u.toast(res.msg);
}
})
// var userInfo = {
// userId: 'user111111111',
// data: [{
// "key": "real_name",
// "value": "用户A"
// },
// {
// "key": "mobile_phone",
// "value": "13800000000"
// },
// {
// "key": "email",
// "value": "13800000000@163.com"
// },
// {
// "index": 0,
// "key": "account",
// "label": "账号",
// "value": "zhangsan",
// "href": "http://example.domain/user/zhangsan"
// },
// {
// "index": 1,
// "key": "sex",
// "label": "性别",
// "value": "先生"
// },
// {
// "index": 2,
// "key": "reg_date",
// "label": "注册日期",
// "value": "2015-11-16"
// },
// {
// "index": 3,
// "key": "last_login",
// "label": "上次登录时间",
// "value": "2015-12-22 15:38:54"
// },
// {
// "index": 4,
// "key": "avatar",
// "label": "头像",
// "value": "https://ysf.nosdn.127.net/985726b5a8840b84a8a90c6b71642813"
// }
// ],
// }
// myPluginInterface._$configTitle('七鱼客服11'); //设置客服聊天窗口标题
// let product = {
// title: '[1]任天堂(Nintendo)Switch游戏机',
// desc: '任天堂(Nintendo) Switch NS NX掌上游戏机便携 塞尔达马里奥新款游戏机 主机不锁 日版黑机彩色手柄+中文赛/塞尔达传说(指南+地图)',
// note: '$2330',
// picture: 'https://img10.360buyimg.com/n5/s75x75_jfs/t4030/290/29851193/293745/d5e2b731/58ac3506Nbb57b5f6.jpg',
// url: 'https://www.taobao.com/',
// isShow: 1,
// sendByUser: 1,
// sendProToRobot: 1,
// };
// myPluginInterface._$configProduct(product); //配置商品信息
// myPluginInterface._$sendProduct(product); //自动发送
}
},
created() {
},
onLoad(){
this.sendMsg()
},
onLaunch() {
}
}
</script>
<style>
.call-center{
display: flex;
justify-content: center;
align-items: center;
height: 86%;
color: #676262;
font-size: 19px;
}
</style>
\ No newline at end of file
<template>
<view>
<!-- <navigator url="plugin://myPlugin/chat">
联系客服
</navigator> -->
<div @click="sendMsg">
发送信息
</div>
</view>
</template>
<script>
import {
APP_ID,
APP_KEY
} from "@/env"
var myPluginInterface = requirePlugin('myPlugin');
myPluginInterface.__configAppId(APP_ID); // 不是微信的appId,ID为七鱼后台该小程序设置的APPID(可能是默认随机生成或自定义的)
myPluginInterface._$configAppKey(APP_KEY); // 申请企业的appKey
export default {
data() {
return {
}
},
methods: {
sendMsg() {
var userInfo = {
userId: 'user111111111',
data: [{
"key": "real_name",
"value": "用户A"
},
{
"key": "mobile_phone",
"value": "13800000000"
},
{
"key": "email",
"value": "13800000000@163.com"
},
{
"index": 0,
"key": "account",
"label": "账号",
"value": "zhangsan",
"href": "http://example.domain/user/zhangsan"
},
{
"index": 1,
"key": "sex",
"label": "性别",
"value": "先生"
},
{
"index": 2,
"key": "reg_date",
"label": "注册日期",
"value": "2015-11-16"
},
{
"index": 3,
"key": "last_login",
"label": "上次登录时间",
"value": "2015-12-22 15:38:54"
},
{
"index": 4,
"key": "avatar",
"label": "头像",
"value": "https://ysf.nosdn.127.net/985726b5a8840b84a8a90c6b71642813"
}
],
}
myPluginInterface._$setUserInfo(userInfo); //上报用户信息
myPluginInterface._$configTitle('七鱼客服11'); //设置客服聊天窗口标题
let product = {
title: '[1]任天堂(Nintendo)Switch游戏机',
desc: '任天堂(Nintendo) Switch NS NX掌上游戏机便携 塞尔达马里奥新款游戏机 主机不锁 日版黑机彩色手柄+中文赛/塞尔达传说(指南+地图)',
note: '$2330',
picture: 'https://img10.360buyimg.com/n5/s75x75_jfs/t4030/290/29851193/293745/d5e2b731/58ac3506Nbb57b5f6.jpg',
url: 'https://www.taobao.com/',
isShow: 1,
sendByUser: 1,
sendProToRobot: 1,
};
myPluginInterface._$configProduct(product); //配置商品信息
myPluginInterface._$sendProduct(product); //自动发送
wx.navigateTo({ //跳转到客服聊天界面
url: 'plugin://myPlugin/chat'
})
}
},
onLaunch() {
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -17,7 +17,7 @@
</view>
</view>
</view>
<image class="bg" src="../../static/img/user/bg.png" mode="scaleToFill"></image>
<image class="bg" src="https://img.zhonghuihaotai.com/file_20230816170416eDXgX.png" mode="scaleToFill"></image>
</view>
</template>
<script>
......
......@@ -62,6 +62,14 @@ export default {
// desc:查询是否有手机号
}
},
public:{
//用户id和客服id
userInfo:{
url: "mall/service/im/info",
auth: true,
method: "get"
}
}
......
static/img/run/bg.png

176 KB | W: | H:

static/img/run/bg.png

29.2 KB | W: | H:

static/img/run/bg.png
static/img/run/bg.png
static/img/run/bg.png
static/img/run/bg.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment