revert: pages/contact/contact.vue 回退到最初状态
This commit is contained in:
@@ -19,30 +19,7 @@
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="view_ul view_ul_one clearfix">
|
||||
<view class="view_li w50_li text-center">
|
||||
<wxwork-contact
|
||||
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;">
|
||||
<button 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>
|
||||
<view class="name bl line1">专属客服</view>
|
||||
</button>
|
||||
@@ -160,12 +137,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import wxworkContact from '@/components/wxwork-contact/wxwork-contact.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
wxworkContact
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
@@ -176,7 +148,6 @@ export default {
|
||||
remark:''
|
||||
|
||||
},
|
||||
wxworkConfig: null, // 企业微信配置
|
||||
markers:[
|
||||
{
|
||||
id:1,
|
||||
@@ -203,52 +174,25 @@ export default {
|
||||
onLoad(option) {
|
||||
//刷新多语言
|
||||
this.$langConfig.refresh();
|
||||
this.loadWxWorkConfig(); // 加载企业微信配置
|
||||
this.loadPersonnel();
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 加载企业微信配置
|
||||
*/
|
||||
loadWxWorkConfig() {
|
||||
// 从全局store获取企业微信配置
|
||||
const wxworkConfig = this.$store.state?.wxworkConfig;
|
||||
if (wxworkConfig) {
|
||||
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 => {
|
||||
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 => {
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
test(){
|
||||
// channelReady(function(bAvailable) {
|
||||
|
||||
Reference in New Issue
Block a user