revert: pages/contact/contact.vue 回退到最初状态
This commit is contained in:
@@ -19,30 +19,7 @@
|
|||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="view_ul view_ul_one clearfix">
|
<view class="view_ul view_ul_one clearfix">
|
||||||
<view class="view_li w50_li text-center">
|
<view class="view_li w50_li text-center">
|
||||||
<wxwork-contact
|
<button class="bl bor" hoverClass="none" openType="contact" sessionFrom="weapp" showMessageCard="true" style="margin: 0;">
|
||||||
v-if="wxworkConfig && wxworkConfig.enabled"
|
|
||||||
:corp-id="wxworkConfig.corpId"
|
|
||||||
:agent-id="wxworkConfig.agentId"
|
|
||||||
:timestamp="wxworkConfig.timestamp"
|
|
||||||
:nonce-str="wxworkConfig.nonceStr"
|
|
||||||
:signature="wxworkConfig.signature"
|
|
||||||
:contact-id="wxworkConfig.contactId"
|
|
||||||
:contact-url="wxworkConfig.contactUrl"
|
|
||||||
btn-text="企业微信客服"
|
|
||||||
:show-confirm="false">
|
|
||||||
<view class="bl bor" style="margin: 0;">
|
|
||||||
<image mode="heightFix" :src="$util.img('public/static/img/wxwork_kefu.png')"></image>
|
|
||||||
<view class="name bl line1">企业微信</view>
|
|
||||||
</view>
|
|
||||||
</wxwork-contact>
|
|
||||||
<button
|
|
||||||
v-else
|
|
||||||
class="bl bor"
|
|
||||||
hoverClass="none"
|
|
||||||
openType="contact"
|
|
||||||
sessionFrom="weapp"
|
|
||||||
showMessageCard="true"
|
|
||||||
style="margin: 0;">
|
|
||||||
<image mode="heightFix" :src="$util.img('public/static/img/kefu.png')"></image>
|
<image mode="heightFix" :src="$util.img('public/static/img/kefu.png')"></image>
|
||||||
<view class="name bl line1">专属客服</view>
|
<view class="name bl line1">专属客服</view>
|
||||||
</button>
|
</button>
|
||||||
@@ -160,12 +137,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import wxworkContact from '@/components/wxwork-contact/wxwork-contact.vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
wxworkContact
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
@@ -176,7 +148,6 @@ export default {
|
|||||||
remark:''
|
remark:''
|
||||||
|
|
||||||
},
|
},
|
||||||
wxworkConfig: null, // 企业微信配置
|
|
||||||
markers:[
|
markers:[
|
||||||
{
|
{
|
||||||
id:1,
|
id:1,
|
||||||
@@ -203,52 +174,25 @@ export default {
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
//刷新多语言
|
//刷新多语言
|
||||||
this.$langConfig.refresh();
|
this.$langConfig.refresh();
|
||||||
this.loadWxWorkConfig(); // 加载企业微信配置
|
this.$api.sendRequest({
|
||||||
this.loadPersonnel();
|
url: '/api/member/personnel',
|
||||||
},
|
success: res => {
|
||||||
|
if (res.code == 0) {
|
||||||
methods: {
|
this.dataList = res.data
|
||||||
/**
|
this.shop = res.shop
|
||||||
* 加载企业微信配置
|
this.personnel_bg = res.set.personnel_bg?res.set.personnel_bg:'public/static/img/diy_view/member_info_bg.png'
|
||||||
*/
|
this.markers = [{
|
||||||
loadWxWorkConfig() {
|
id:1,
|
||||||
// 从全局store获取企业微信配置
|
//iconPath:'http://saas.cn//public/static/img/kefu.png',
|
||||||
const wxworkConfig = this.$store.state?.wxworkConfig;
|
latitude:this.shop.latitude,
|
||||||
if (wxworkConfig) {
|
longitude:this.shop.longitude
|
||||||
this.wxworkConfig = {
|
}]
|
||||||
enabled: true,
|
|
||||||
corpId: wxworkConfig.corp_id,
|
|
||||||
contactId: wxworkConfig.contact_id,
|
|
||||||
contactUrl: wxworkConfig.contact_url
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
this.wxworkConfig = { enabled: false };
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加载人员信息
|
|
||||||
*/
|
|
||||||
loadPersonnel() {
|
|
||||||
this.$api.sendRequest({
|
|
||||||
url: '/api/member/personnel',
|
|
||||||
success: res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.dataList = res.data
|
|
||||||
this.shop = res.shop
|
|
||||||
this.personnel_bg = res.set.personnel_bg?res.set.personnel_bg:'public/static/img/diy_view/member_info_bg.png'
|
|
||||||
this.markers = [{
|
|
||||||
id:1,
|
|
||||||
//iconPath:'http://saas.cn//public/static/img/kefu.png',
|
|
||||||
latitude:this.shop.latitude,
|
|
||||||
longitude:this.shop.longitude
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fail: res => {
|
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
},
|
fail: res => {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
test(){
|
test(){
|
||||||
// channelReady(function(bAvailable) {
|
// channelReady(function(bAvailable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user