yc-ui2 0.1.1 → 0.1.2-beta01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +2 -0
- package/README.md +33 -30
- package/dist/yc-ui2.common.js +555 -7
- package/dist/yc-ui2.common.js.map +1 -1
- package/dist/yc-ui2.css +1 -1
- package/dist/yc-ui2.umd.js +555 -7
- package/dist/yc-ui2.umd.js.map +1 -1
- package/dist/yc-ui2.umd.min.js +1 -1
- package/dist/yc-ui2.umd.min.js.map +1 -1
- package/md/CustomerService.md +70 -0
- package/md/YcSlideVerify.md +16 -0
- package/package.json +55 -53
- package/src/App.vue +41 -27
- package/src/assets/questions.js +115 -0
- package/src/main.js +18 -15
- package/src/router/index.js +20 -0
- package/src/views/question.vue +22 -0
- package/vue.config.js +31 -30
- package/src/assets/slideVerify/1.jpg +0 -0
- package/src/assets/slideVerify/2.jpg +0 -0
- package/src/assets/slideVerify/3.jpg +0 -0
- package/src/assets/slideVerify/4.jpg +0 -0
- package/src/assets/slideVerify/5.jpg +0 -0
- package/src/assets/slideVerify/6.jpg +0 -0
- package/src/assets/slideVerify/7.jpg +0 -0
- package/src/assets/slideVerify/8.jpg +0 -0
package/.env
ADDED
package/README.md
CHANGED
@@ -1,30 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
import
|
9
|
-
|
10
|
-
Vue.use(Ycui2)
|
11
|
-
```
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
|
1
|
+
# 使用
|
2
|
+
|
3
|
+
安装命令:`npm install yc-ui2`
|
4
|
+
|
5
|
+
#### main.js 导入
|
6
|
+
```javascript
|
7
|
+
import Ycui2 from 'yc-ui2'
|
8
|
+
import "yc-ui2/dist/yc-ui2.css"
|
9
|
+
|
10
|
+
Vue.use(Ycui2)
|
11
|
+
```
|
12
|
+
|
13
|
+
#### vue.config.js
|
14
|
+
|
15
|
+
```javascript
|
16
|
+
proxy: {
|
17
|
+
// 在proxy中添加以下代码
|
18
|
+
['/cloud-img']: {
|
19
|
+
target: `http://113.219.171.47:6610/cloud-img/`,
|
20
|
+
changeOrigin: true,
|
21
|
+
pathRewrite: {
|
22
|
+
["^/cloud-img"]: "",
|
23
|
+
},
|
24
|
+
},
|
25
|
+
}
|
26
|
+
```
|
27
|
+
|
28
|
+
# 组件
|
29
|
+
|
30
|
+
| Name | Describe |
|
31
|
+
| ------- | -------- |
|
32
|
+
| [YcSlideVerify](./md/YcSlideVerify.md "点击跳转查看组件详情") | 滑动验证 |
|
33
|
+
| [YcCustomerService、YcQuestion](./md/CustomerService.md "点击跳转查看组件详情") | 小优客服 |
|
package/dist/yc-ui2.common.js
CHANGED
@@ -1673,11 +1673,11 @@ if (typeof window !== 'undefined') {
|
|
1673
1673
|
// Indicate to webpack that this file can be concatenated
|
1674
1674
|
/* harmony default export */ var setPublicPath = (null);
|
1675
1675
|
|
1676
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=template&id=
|
1676
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=template&id=2248e29b&scoped=true&
|
1677
1677
|
var render = function render() {
|
1678
1678
|
var _vm = this,
|
1679
1679
|
_c = _vm._self._c;
|
1680
|
-
return _c('
|
1680
|
+
return _c('el-dialog', {
|
1681
1681
|
attrs: {
|
1682
1682
|
"title": _vm.title,
|
1683
1683
|
"visible": _vm.isShow,
|
@@ -1705,7 +1705,7 @@ var render = function render() {
|
|
1705
1705
|
"refresh": _vm.onRefresh,
|
1706
1706
|
"fulfilled": _vm.onFulfilled
|
1707
1707
|
}
|
1708
|
-
})], 1)
|
1708
|
+
})], 1);
|
1709
1709
|
};
|
1710
1710
|
var staticRenderFns = [];
|
1711
1711
|
|
@@ -1757,10 +1757,10 @@ var es_array_push = __webpack_require__(7658);
|
|
1757
1757
|
});
|
1758
1758
|
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue?vue&type=script&lang=js&
|
1759
1759
|
/* harmony default export */ var components_YcSlideVerifyvue_type_script_lang_js_ = (YcSlideVerifyvue_type_script_lang_js_);
|
1760
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=
|
1760
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=2248e29b&prod&lang=scss&scoped=true&
|
1761
1761
|
// extracted by mini-css-extract-plugin
|
1762
1762
|
|
1763
|
-
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=
|
1763
|
+
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=2248e29b&prod&lang=scss&scoped=true&
|
1764
1764
|
|
1765
1765
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
1766
1766
|
/* globals __VUE_SSR_CONTEXT__ */
|
@@ -1875,15 +1875,563 @@ var component = normalizeComponent(
|
|
1875
1875
|
staticRenderFns,
|
1876
1876
|
false,
|
1877
1877
|
null,
|
1878
|
-
"
|
1878
|
+
"2248e29b",
|
1879
1879
|
null
|
1880
1880
|
|
1881
1881
|
)
|
1882
1882
|
|
1883
1883
|
/* harmony default export */ var YcSlideVerify = (component.exports);
|
1884
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/index.vue?vue&type=template&id=849349a0&scoped=true&
|
1885
|
+
var YcCustomerServicevue_type_template_id_849349a0_scoped_true_render = function render() {
|
1886
|
+
var _vm = this,
|
1887
|
+
_c = _vm._self._c;
|
1888
|
+
return _c('div', {
|
1889
|
+
ref: "customer",
|
1890
|
+
staticStyle: {
|
1891
|
+
"display": "none"
|
1892
|
+
}
|
1893
|
+
}, [_c('chat-vue', {
|
1894
|
+
attrs: {
|
1895
|
+
"visible": _vm.visible,
|
1896
|
+
"jumpPage": _vm.jumpPage,
|
1897
|
+
"title": _vm.title,
|
1898
|
+
"json": _vm.json,
|
1899
|
+
"regular": _vm.regular
|
1900
|
+
},
|
1901
|
+
on: {
|
1902
|
+
"update:visible": function ($event) {
|
1903
|
+
_vm.visible = $event;
|
1904
|
+
}
|
1905
|
+
}
|
1906
|
+
}), _c('div', {
|
1907
|
+
staticClass: "customerService"
|
1908
|
+
}, [_c('div', {
|
1909
|
+
staticClass: "mobile"
|
1910
|
+
}, [_vm._t("default")], 2), _c('div', {
|
1911
|
+
staticClass: "headset",
|
1912
|
+
on: {
|
1913
|
+
"click": function ($event) {
|
1914
|
+
_vm.visible = !_vm.visible;
|
1915
|
+
}
|
1916
|
+
}
|
1917
|
+
}, [_vm._m(0), _vm._m(1)])])], 1);
|
1918
|
+
};
|
1919
|
+
var YcCustomerServicevue_type_template_id_849349a0_scoped_true_staticRenderFns = [function () {
|
1920
|
+
var _vm = this,
|
1921
|
+
_c = _vm._self._c;
|
1922
|
+
return _c('div', [_c('i', {
|
1923
|
+
staticClass: "el-icon-headset"
|
1924
|
+
})]);
|
1925
|
+
}, function () {
|
1926
|
+
var _vm = this,
|
1927
|
+
_c = _vm._self._c;
|
1928
|
+
return _c('div', [_c('a', [_vm._v("在线客服")])]);
|
1929
|
+
}];
|
1930
|
+
|
1931
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/index.vue?vue&type=template&id=849349a0&scoped=true&
|
1932
|
+
|
1933
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/chat.vue?vue&type=template&id=dcf285b2&
|
1934
|
+
var chatvue_type_template_id_dcf285b2_render = function render() {
|
1935
|
+
var _vm = this,
|
1936
|
+
_c = _vm._self._c;
|
1937
|
+
return _c('div', {
|
1938
|
+
directives: [{
|
1939
|
+
name: "show",
|
1940
|
+
rawName: "v-show",
|
1941
|
+
value: _vm.visible,
|
1942
|
+
expression: "visible"
|
1943
|
+
}],
|
1944
|
+
staticClass: "chat"
|
1945
|
+
}, [_c('header', [_c('img', {
|
1946
|
+
attrs: {
|
1947
|
+
"src": "/cloud-img/customerService/admin.jpg"
|
1948
|
+
}
|
1949
|
+
}), _c('span', [_vm._v(_vm._s(_vm.title))]), _vm.jumpPage ? _c('i', {
|
1950
|
+
staticClass: "icon-enlarge",
|
1951
|
+
on: {
|
1952
|
+
"click": _vm.enlarge
|
1953
|
+
}
|
1954
|
+
}, [_c('img', {
|
1955
|
+
attrs: {
|
1956
|
+
"src": "/cloud-img/customerService/enlarge.png"
|
1957
|
+
}
|
1958
|
+
})]) : _vm._e(), _c('i', {
|
1959
|
+
staticClass: "el-icon-close",
|
1960
|
+
on: {
|
1961
|
+
"click": _vm.close
|
1962
|
+
}
|
1963
|
+
})]), _c('main', {
|
1964
|
+
ref: "main"
|
1965
|
+
}, _vm._l(_vm.messagelist, function (item, index) {
|
1966
|
+
return _c('div', {
|
1967
|
+
key: index,
|
1968
|
+
class: ['message', item.id]
|
1969
|
+
}, [_c('img', {
|
1970
|
+
staticClass: "avatar",
|
1971
|
+
attrs: {
|
1972
|
+
"src": `/cloud-img/customerService/${item.id}.jpg`
|
1973
|
+
}
|
1974
|
+
}), _c('div', {
|
1975
|
+
staticClass: "content"
|
1976
|
+
}, [_vm._l(item.msg, function (msg, index) {
|
1977
|
+
return _c('span', {
|
1978
|
+
key: msg + index,
|
1979
|
+
class: item.msg.length > 1 ? 'href' : '',
|
1980
|
+
domProps: {
|
1981
|
+
"innerHTML": _vm._s((item.msg.length > 1 ? 1 + index + '. ' : ' ') + msg)
|
1982
|
+
},
|
1983
|
+
on: {
|
1984
|
+
"click": function ($event) {
|
1985
|
+
item.msg.length > 1 && _vm.regularClick(msg);
|
1986
|
+
}
|
1987
|
+
}
|
1988
|
+
});
|
1989
|
+
}), item.based ? _c('div', {
|
1990
|
+
staticClass: "based",
|
1991
|
+
on: {
|
1992
|
+
"click": function ($event) {
|
1993
|
+
return _vm.handExpand(item);
|
1994
|
+
}
|
1995
|
+
}
|
1996
|
+
}, [_c('span', [_vm._v("依据")]), _c('span', {
|
1997
|
+
class: {
|
1998
|
+
'is-active': item.isActive
|
1999
|
+
}
|
2000
|
+
}, [_vm._v(_vm._s(item.based)), _c('i', {
|
2001
|
+
staticClass: "el-icon-d-arrow-right"
|
2002
|
+
})])]) : _vm._e()], 2)]);
|
2003
|
+
}), 0), _c('nav', _vm._l(_vm.regular, function (item, index) {
|
2004
|
+
return _c('el-button', {
|
2005
|
+
key: item + index,
|
2006
|
+
attrs: {
|
2007
|
+
"size": "mini",
|
2008
|
+
"round": ""
|
2009
|
+
},
|
2010
|
+
on: {
|
2011
|
+
"click": function ($event) {
|
2012
|
+
return _vm.regularClick(item);
|
2013
|
+
}
|
2014
|
+
}
|
2015
|
+
}, [_vm._v(_vm._s(item))]);
|
2016
|
+
}), 1), _c('el-input', {
|
2017
|
+
attrs: {
|
2018
|
+
"type": "textarea",
|
2019
|
+
"maxlength": "500",
|
2020
|
+
"autosize": {
|
2021
|
+
minRows: 2,
|
2022
|
+
maxRows: 3
|
2023
|
+
},
|
2024
|
+
"autofocus": "true",
|
2025
|
+
"resize": "none",
|
2026
|
+
"placeholder": "请反馈您的问题,我们将尽快回复"
|
2027
|
+
},
|
2028
|
+
nativeOn: {
|
2029
|
+
"keyup": function ($event) {
|
2030
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
2031
|
+
return _vm.carriageReturn.apply(null, arguments);
|
2032
|
+
}
|
2033
|
+
},
|
2034
|
+
model: {
|
2035
|
+
value: _vm.textareaValue,
|
2036
|
+
callback: function ($$v) {
|
2037
|
+
_vm.textareaValue = $$v;
|
2038
|
+
},
|
2039
|
+
expression: "textareaValue"
|
2040
|
+
}
|
2041
|
+
}), _c('el-button', {
|
2042
|
+
attrs: {
|
2043
|
+
"type": "primary",
|
2044
|
+
"size": "mini",
|
2045
|
+
"disabled": !_vm.textareaValue
|
2046
|
+
},
|
2047
|
+
on: {
|
2048
|
+
"click": _vm.send
|
2049
|
+
}
|
2050
|
+
}, [_vm._v("发送")])], 1);
|
2051
|
+
};
|
2052
|
+
var chatvue_type_template_id_dcf285b2_staticRenderFns = [];
|
2053
|
+
|
2054
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/chatMixin.js
|
2055
|
+
|
2056
|
+
/* harmony default export */ var chatMixin = ({
|
2057
|
+
props: {
|
2058
|
+
visible: Boolean,
|
2059
|
+
jumpPage: String,
|
2060
|
+
json: String,
|
2061
|
+
title: String,
|
2062
|
+
commit: String,
|
2063
|
+
regular: Array
|
2064
|
+
},
|
2065
|
+
data() {
|
2066
|
+
return {
|
2067
|
+
textareaValue: "",
|
2068
|
+
// regular: ['发票增值税率', '城市维护建设税', '教育费附加征收率'],
|
2069
|
+
messagelist: [{
|
2070
|
+
id: 'admin',
|
2071
|
+
msg: ['您好,38号客服很高兴为你服务!'],
|
2072
|
+
isActive: false
|
2073
|
+
}
|
2074
|
+
// {id: 'personal', msg: ['消费税?']}
|
2075
|
+
],
|
2076
|
+
|
2077
|
+
isActive: false
|
2078
|
+
};
|
2079
|
+
},
|
2080
|
+
computed: {
|
2081
|
+
questions() {
|
2082
|
+
return JSON.parse(this.json);
|
2083
|
+
}
|
2084
|
+
},
|
2085
|
+
methods: {
|
2086
|
+
close() {
|
2087
|
+
this.$emit("update:visible", false);
|
2088
|
+
},
|
2089
|
+
carriageReturn() {
|
2090
|
+
let e = window.event || arguments[0];
|
2091
|
+
if ((e.key == "Enter" || e.code == "Enter" || e.keyCode == 13) && this.textareaValue) {
|
2092
|
+
this.send();
|
2093
|
+
}
|
2094
|
+
},
|
2095
|
+
send() {
|
2096
|
+
if (!this.textareaValue.replace(/[^\w\u4E00-\u9FA5]/g, '')) return;
|
2097
|
+
this.add(this.textareaValue, "personal", () => {
|
2098
|
+
this.textareaValue = '';
|
2099
|
+
});
|
2100
|
+
this.search(this.textareaValue);
|
2101
|
+
},
|
2102
|
+
regularClick(msg) {
|
2103
|
+
this.add(msg);
|
2104
|
+
this.search(msg);
|
2105
|
+
},
|
2106
|
+
search(msg) {
|
2107
|
+
const list = this.questions.filter(item => item.faq.replace(/[^\w\u4E00-\u9FA5]/g, '').toLowerCase().includes(msg.replace(/[^\w\u4E00-\u9FA5]/g, '').toLowerCase()));
|
2108
|
+
let [vlaue, based] = ['', ''];
|
2109
|
+
if (list.length > 1) {
|
2110
|
+
vlaue = list.reduce((prev, curr) => [...prev, curr.faq], []);
|
2111
|
+
} else if (list.length == 1) {
|
2112
|
+
[vlaue, based] = [list[0].msg, list[0].based];
|
2113
|
+
} else if (["您好", "你好"].includes(msg.replace(/[^\w\u4E00-\u9FA5]/g, ''))) {
|
2114
|
+
vlaue = '您好!';
|
2115
|
+
} else {
|
2116
|
+
vlaue = '请提关键词问题?<br/> 比如: 税率<br/><br/><a href="tel:4000770168">客服热线:<span style="color: #FF575F;">400 0770 168</span></a>';
|
2117
|
+
}
|
2118
|
+
this.add(vlaue, 'admin', null, based);
|
2119
|
+
},
|
2120
|
+
add(msg, id = "personal", fun, based = "") {
|
2121
|
+
this.messagelist.push({
|
2122
|
+
id,
|
2123
|
+
msg: Array.isArray(msg) ? msg : [msg],
|
2124
|
+
based,
|
2125
|
+
isActive: false
|
2126
|
+
});
|
2127
|
+
this.$nextTick(() => {
|
2128
|
+
fun && fun();
|
2129
|
+
// this.$refs.main.scrollTop += 70
|
2130
|
+
this.$refs.main.scrollTop = this.$refs.main.scrollHeight;
|
2131
|
+
// console.log(this.$refs.main.scrollTop, this.$refs.main.scrollHeight)
|
2132
|
+
});
|
2133
|
+
},
|
2134
|
+
|
2135
|
+
enlarge() {
|
2136
|
+
// this.$router.resolve({
|
2137
|
+
// name: this.jumpPage
|
2138
|
+
// })
|
2139
|
+
|
2140
|
+
window.open(this.jumpPage, '_blank');
|
2141
|
+
},
|
2142
|
+
handExpand(item) {
|
2143
|
+
item.isActive = !item.isActive;
|
2144
|
+
}
|
2145
|
+
}
|
2146
|
+
});
|
2147
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/chat.vue?vue&type=script&lang=js&
|
2148
|
+
|
2149
|
+
/* harmony default export */ var chatvue_type_script_lang_js_ = ({
|
2150
|
+
name: "ChatMini",
|
2151
|
+
mixins: [chatMixin]
|
2152
|
+
});
|
2153
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/chat.vue?vue&type=script&lang=js&
|
2154
|
+
/* harmony default export */ var YcCustomerService_chatvue_type_script_lang_js_ = (chatvue_type_script_lang_js_);
|
2155
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/chat.vue?vue&type=style&index=0&id=dcf285b2&prod&lang=scss&
|
2156
|
+
// extracted by mini-css-extract-plugin
|
2157
|
+
|
2158
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/chat.vue?vue&type=style&index=0&id=dcf285b2&prod&lang=scss&
|
2159
|
+
|
2160
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/chat.vue
|
2161
|
+
|
2162
|
+
|
2163
|
+
|
2164
|
+
;
|
2165
|
+
|
2166
|
+
|
2167
|
+
/* normalize component */
|
2168
|
+
|
2169
|
+
var chat_component = normalizeComponent(
|
2170
|
+
YcCustomerService_chatvue_type_script_lang_js_,
|
2171
|
+
chatvue_type_template_id_dcf285b2_render,
|
2172
|
+
chatvue_type_template_id_dcf285b2_staticRenderFns,
|
2173
|
+
false,
|
2174
|
+
null,
|
2175
|
+
null,
|
2176
|
+
null
|
2177
|
+
|
2178
|
+
)
|
2179
|
+
|
2180
|
+
/* harmony default export */ var chat = (chat_component.exports);
|
2181
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/index.vue?vue&type=script&lang=js&
|
2182
|
+
|
2183
|
+
/* harmony default export */ var YcCustomerServicevue_type_script_lang_js_ = ({
|
2184
|
+
name: "YcCustomerService",
|
2185
|
+
components: {
|
2186
|
+
chatVue: chat
|
2187
|
+
},
|
2188
|
+
props: {
|
2189
|
+
jumpPage: String,
|
2190
|
+
title: String,
|
2191
|
+
json: String,
|
2192
|
+
regular: Array
|
2193
|
+
},
|
2194
|
+
data() {
|
2195
|
+
return {
|
2196
|
+
visible: false
|
2197
|
+
};
|
2198
|
+
},
|
2199
|
+
computed: {
|
2200
|
+
hasSlot() {
|
2201
|
+
return Boolean(this.$slots.default);
|
2202
|
+
}
|
2203
|
+
},
|
2204
|
+
watch: {
|
2205
|
+
$route(to) {
|
2206
|
+
if (to.path != this.jumpPage) {
|
2207
|
+
this.$refs.customer.style.display = "block";
|
2208
|
+
} else {
|
2209
|
+
this.$refs.customer.style.display = "none";
|
2210
|
+
}
|
2211
|
+
}
|
2212
|
+
},
|
2213
|
+
mounted() {
|
2214
|
+
this.$refs.customer.style.display = "block";
|
2215
|
+
}
|
2216
|
+
});
|
2217
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/index.vue?vue&type=script&lang=js&
|
2218
|
+
/* harmony default export */ var components_YcCustomerServicevue_type_script_lang_js_ = (YcCustomerServicevue_type_script_lang_js_);
|
2219
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/index.vue?vue&type=style&index=0&id=849349a0&prod&lang=scss&scoped=true&
|
2220
|
+
// extracted by mini-css-extract-plugin
|
2221
|
+
|
2222
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/index.vue?vue&type=style&index=0&id=849349a0&prod&lang=scss&scoped=true&
|
2223
|
+
|
2224
|
+
;// CONCATENATED MODULE: ./src/components/YcCustomerService/index.vue
|
2225
|
+
|
2226
|
+
|
2227
|
+
|
2228
|
+
;
|
2229
|
+
|
2230
|
+
|
2231
|
+
/* normalize component */
|
2232
|
+
|
2233
|
+
var YcCustomerService_component = normalizeComponent(
|
2234
|
+
components_YcCustomerServicevue_type_script_lang_js_,
|
2235
|
+
YcCustomerServicevue_type_template_id_849349a0_scoped_true_render,
|
2236
|
+
YcCustomerServicevue_type_template_id_849349a0_scoped_true_staticRenderFns,
|
2237
|
+
false,
|
2238
|
+
null,
|
2239
|
+
"849349a0",
|
2240
|
+
null
|
2241
|
+
|
2242
|
+
)
|
2243
|
+
|
2244
|
+
/* harmony default export */ var YcCustomerService = (YcCustomerService_component.exports);
|
2245
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=template&id=168e6b3f&
|
2246
|
+
var YcQuestionvue_type_template_id_168e6b3f_render = function render() {
|
2247
|
+
var _vm = this,
|
2248
|
+
_c = _vm._self._c;
|
2249
|
+
return _c('div', {
|
2250
|
+
staticClass: "chatPage"
|
2251
|
+
}, [_c('header', {
|
2252
|
+
staticStyle: {
|
2253
|
+
"background": "url('/cloud-img/customerService/chatTop.png') center",
|
2254
|
+
"background-size": "cover"
|
2255
|
+
}
|
2256
|
+
}, [_c('div', [_c('h3', [_vm._v(_vm._s(_vm.title))]), _c('span', [_vm._v("Problem Help")])]), _c('p', [_vm._v("小优为您提供24小时服务")])]), _c('div', {
|
2257
|
+
staticClass: "main"
|
2258
|
+
}, [_c('div', [_c('main', {
|
2259
|
+
ref: "main"
|
2260
|
+
}, [_c('p', [_vm._v("今天" + _vm._s(_vm.currData))]), _vm._l(_vm.messagelist, function (item, index) {
|
2261
|
+
return _c('div', {
|
2262
|
+
key: index,
|
2263
|
+
class: ['message', item.id]
|
2264
|
+
}, [_c('img', {
|
2265
|
+
staticClass: "avatar",
|
2266
|
+
attrs: {
|
2267
|
+
"src": '/cloud-img/customerService/' + item.id + '.jpg'
|
2268
|
+
}
|
2269
|
+
}), _c('div', {
|
2270
|
+
staticClass: "content"
|
2271
|
+
}, [_vm._l(item.msg, function (msg, index) {
|
2272
|
+
return _c('span', {
|
2273
|
+
key: msg + index,
|
2274
|
+
class: item.msg.length > 1 ? 'href' : '',
|
2275
|
+
domProps: {
|
2276
|
+
"innerHTML": _vm._s((item.msg.length > 1 ? 1 + index + '. ' : ' ') + msg)
|
2277
|
+
},
|
2278
|
+
on: {
|
2279
|
+
"click": function ($event) {
|
2280
|
+
item.msg.length > 1 && _vm.regularClick(msg);
|
2281
|
+
}
|
2282
|
+
}
|
2283
|
+
});
|
2284
|
+
}), item.based ? _c('div', {
|
2285
|
+
staticClass: "based",
|
2286
|
+
on: {
|
2287
|
+
"click": function ($event) {
|
2288
|
+
$event.preventDefault();
|
2289
|
+
return _vm.handExpand(item);
|
2290
|
+
}
|
2291
|
+
}
|
2292
|
+
}, [_c('span', [_vm._v("依据")]), _c('span', {
|
2293
|
+
class: {
|
2294
|
+
'is-active': item.isActive
|
2295
|
+
}
|
2296
|
+
}, [_vm._v(_vm._s(item.based)), _c('i', {
|
2297
|
+
staticClass: "el-icon-d-arrow-right"
|
2298
|
+
})])]) : _vm._e()], 2)]);
|
2299
|
+
})], 2), _c('footer', [_c('el-input', {
|
2300
|
+
attrs: {
|
2301
|
+
"type": "textarea",
|
2302
|
+
"maxlength": "500",
|
2303
|
+
"autosize": {
|
2304
|
+
minRows: 6,
|
2305
|
+
maxRows: 6
|
2306
|
+
},
|
2307
|
+
"autofocus": "true",
|
2308
|
+
"resize": "none",
|
2309
|
+
"placeholder": "请输入你要咨询的问题"
|
2310
|
+
},
|
2311
|
+
nativeOn: {
|
2312
|
+
"keyup": function ($event) {
|
2313
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
2314
|
+
return _vm.carriageReturn.apply(null, arguments);
|
2315
|
+
}
|
2316
|
+
},
|
2317
|
+
model: {
|
2318
|
+
value: _vm.textareaValue,
|
2319
|
+
callback: function ($$v) {
|
2320
|
+
_vm.textareaValue = $$v;
|
2321
|
+
},
|
2322
|
+
expression: "textareaValue"
|
2323
|
+
}
|
2324
|
+
}), _c('el-button', {
|
2325
|
+
style: !_vm.textareaValue ? 'background-color: #F7F7F9;color: #FF575F;border-color: transparent;' : '',
|
2326
|
+
attrs: {
|
2327
|
+
"type": "primary",
|
2328
|
+
"disabled": !_vm.textareaValue
|
2329
|
+
},
|
2330
|
+
on: {
|
2331
|
+
"click": _vm.send
|
2332
|
+
}
|
2333
|
+
}, [_vm._v("发送")])], 1)]), _c('aside', [_c('el-collapse', {
|
2334
|
+
attrs: {
|
2335
|
+
"accordion": ""
|
2336
|
+
},
|
2337
|
+
model: {
|
2338
|
+
value: _vm.activeNames,
|
2339
|
+
callback: function ($$v) {
|
2340
|
+
_vm.activeNames = $$v;
|
2341
|
+
},
|
2342
|
+
expression: "activeNames"
|
2343
|
+
}
|
2344
|
+
}, _vm._l(_vm.questionsList, function (item, key, index) {
|
2345
|
+
return _c('el-collapse-item', {
|
2346
|
+
key: key,
|
2347
|
+
attrs: {
|
2348
|
+
"name": index
|
2349
|
+
}
|
2350
|
+
}, [_c('template', {
|
2351
|
+
slot: "title"
|
2352
|
+
}, [_c('img', {
|
2353
|
+
attrs: {
|
2354
|
+
"src": "/cloud-img/customerService/ellipticalWenh.png"
|
2355
|
+
}
|
2356
|
+
}), _vm._v(_vm._s(key) + " ")]), _vm._l(item, function (faq) {
|
2357
|
+
return _c('div', {
|
2358
|
+
key: faq,
|
2359
|
+
domProps: {
|
2360
|
+
"innerHTML": _vm._s(faq)
|
2361
|
+
},
|
2362
|
+
on: {
|
2363
|
+
"click": function ($event) {
|
2364
|
+
return _vm.regularClick(faq);
|
2365
|
+
}
|
2366
|
+
}
|
2367
|
+
});
|
2368
|
+
})], 2);
|
2369
|
+
}), 1)], 1)])]);
|
2370
|
+
};
|
2371
|
+
var YcQuestionvue_type_template_id_168e6b3f_staticRenderFns = [];
|
2372
|
+
|
2373
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=script&lang=js&
|
2374
|
+
|
2375
|
+
|
2376
|
+
/* harmony default export */ var YcQuestionvue_type_script_lang_js_ = ({
|
2377
|
+
name: "YcQuestion",
|
2378
|
+
mixins: [chatMixin],
|
2379
|
+
data() {
|
2380
|
+
return {
|
2381
|
+
activeNames: [1]
|
2382
|
+
};
|
2383
|
+
},
|
2384
|
+
computed: {
|
2385
|
+
currData() {
|
2386
|
+
const currData = new Date();
|
2387
|
+
return `${currData.getHours()}:${currData.getMinutes()}`;
|
2388
|
+
},
|
2389
|
+
questionsList() {
|
2390
|
+
return this.questions.reduce((prev, curr) => {
|
2391
|
+
// eslint-disable-next-line no-prototype-builtins
|
2392
|
+
if (prev.hasOwnProperty(curr.type)) {
|
2393
|
+
prev[curr.type].push(curr.faq);
|
2394
|
+
} else {
|
2395
|
+
prev[curr.type] = [curr.faq];
|
2396
|
+
}
|
2397
|
+
return prev;
|
2398
|
+
}, {});
|
2399
|
+
}
|
2400
|
+
}
|
2401
|
+
});
|
2402
|
+
;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue?vue&type=script&lang=js&
|
2403
|
+
/* harmony default export */ var components_YcQuestionvue_type_script_lang_js_ = (YcQuestionvue_type_script_lang_js_);
|
2404
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcQuestion/index.vue?vue&type=style&index=0&id=168e6b3f&prod&lang=scss&
|
2405
|
+
// extracted by mini-css-extract-plugin
|
2406
|
+
|
2407
|
+
;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue?vue&type=style&index=0&id=168e6b3f&prod&lang=scss&
|
2408
|
+
|
2409
|
+
;// CONCATENATED MODULE: ./src/components/YcQuestion/index.vue
|
2410
|
+
|
2411
|
+
|
2412
|
+
|
2413
|
+
;
|
2414
|
+
|
2415
|
+
|
2416
|
+
/* normalize component */
|
2417
|
+
|
2418
|
+
var YcQuestion_component = normalizeComponent(
|
2419
|
+
components_YcQuestionvue_type_script_lang_js_,
|
2420
|
+
YcQuestionvue_type_template_id_168e6b3f_render,
|
2421
|
+
YcQuestionvue_type_template_id_168e6b3f_staticRenderFns,
|
2422
|
+
false,
|
2423
|
+
null,
|
2424
|
+
null,
|
2425
|
+
null
|
2426
|
+
|
2427
|
+
)
|
2428
|
+
|
2429
|
+
/* harmony default export */ var YcQuestion = (YcQuestion_component.exports);
|
1884
2430
|
;// CONCATENATED MODULE: ./src/packages/index.js
|
1885
2431
|
|
1886
|
-
|
2432
|
+
|
2433
|
+
|
2434
|
+
const components = [YcSlideVerify, YcCustomerService, YcQuestion];
|
1887
2435
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
1888
2436
|
const install = function (Vue) {
|
1889
2437
|
// 遍历注册全局组件
|