feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<!-- 在线客服 -->
|
||||
<view class="custmer" v-show="!dataConfig.isHide">
|
||||
<!-- #ifdef H5 || APP-PLUS -->
|
||||
<view class="customerService" :class="positions?'':'on'" :style="'top:'+topConfig" @touchmove.stop.prevent="setTouchMove" @click="licks">
|
||||
<view class="pictrue">
|
||||
<image :src="logoConfig"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<view class="customerService" :class="positions?'':'on'" :style="'top:'+topConfig" @touchmove.stop.prevent="setTouchMove" v-if="routineContact === 0" @click="licks">
|
||||
<view class="pictrue">
|
||||
<image :src="logoConfig"></image>
|
||||
</view>
|
||||
</view>
|
||||
<button class="customerService-sty" :class="positions?'':'on'" :style="'top:'+topConfig" @touchmove.stop.prevent="setTouchMove" open-type='contact' v-if="routineContact === 1">
|
||||
<image class="pictrue" :src="logoConfig"></image>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
export default {
|
||||
name: 'customerService',
|
||||
computed: mapGetters(['userInfo']),
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
isSortType:{
|
||||
type: String | Number,
|
||||
default:0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
routineContact: parseFloat(this.dataConfig.routine_contact_type),
|
||||
logoConfig: this.dataConfig.logoConfig.url,
|
||||
topConfig: this.dataConfig.topConfig.val?this.dataConfig.topConfig.val>=80?80+'%':this.dataConfig.topConfig.val+'%':'30%',
|
||||
positions: this.dataConfig.locationConfig.tabVal
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
licks(){
|
||||
if (this.dataConfig.buttonConfig.tabVal) {
|
||||
let userInfo = {}
|
||||
if(typeof this.userInfo === 'string'){
|
||||
userInfo = JSON.parse(this.userInfo)
|
||||
}else{
|
||||
userInfo = this.userInfo
|
||||
}
|
||||
this.$util.getCustomer(userInfo)
|
||||
} else{
|
||||
this.$util.JumpPath(this.dataConfig.logoConfig.link);
|
||||
}
|
||||
// let userInfo = {}
|
||||
// if(typeof this.userInfo === 'string'){
|
||||
// userInfo = JSON.parse(this.userInfo)
|
||||
// }else{
|
||||
// userInfo = this.userInfo
|
||||
// }
|
||||
// this.$util.getCustomer(userInfo)
|
||||
},
|
||||
setTouchMove(e) {
|
||||
var that = this;
|
||||
if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
|
||||
that.topConfig = e.touches[0].clientY+'px'
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.custmer {
|
||||
touch-action: none;
|
||||
}
|
||||
.customerService,.customerService-sty {
|
||||
position: fixed;
|
||||
right: 20rpx;
|
||||
z-index: 40;
|
||||
&.on {
|
||||
left:20rpx;
|
||||
}
|
||||
.pictrue {
|
||||
width: 86rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.customerService-sty{
|
||||
background-color: rgba(0,0,0,0) !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user