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