首次提交

This commit is contained in:
duan
2024-06-06 11:49:50 +08:00
parent de480ef0a3
commit c5ebf34d7e
274 changed files with 58048 additions and 1 deletions

135
my/other/customer.vue Normal file
View File

@@ -0,0 +1,135 @@
<template>
<view style="height: 100vh;margin: 32upx;">
<view style="text-align: center;background: #FFFFFF;padding: 40upx;border-radius: 32upx;">
<view style="font-size: 38upx;">添加客服微信咨询</view>
<view style="font-size: 32upx;margin-top: 32upx;">微信号{{weixin}}</view>
<view style="font-size: 32upx;margin-top: 32upx;">手机号{{phone}}</view>
<view @click="copyHref"
style="background: #557EFD;width:200upx;margin-top: 32upx;font-size: 30upx;margin-left: 36%;color: #FFFFFF;padding: 4upx 20upx;border-radius: 24upx;">
一键复制</view>
<image @click="saveImg" mode="aspectFit" style="margin-top: 32upx" :src="images"></image>
<view style="font-size: 28upx;margin-top: 32upx" v-if="isWeiXin">{{ isWeiXin ? '长按识别上方二维码' : '' }}</view>
<!-- <button open-type="contact">在线客服</button> -->
<!-- <view @click="goChat"
style="width:260upx;margin-top: 32upx;font-size: 30upx;margin-left: 28%;color: #557EFD;padding: 4upx 20upx;border-radius: 24upx;">
联系在线客服</view>
<view v-if="isWeiXin" style="font-size: 24upx;margin-top: 80upx" @click="rests">无法识别</view> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
images: 'https://www.gomyorder.cn/custom.jpg',
isWeiXin: false,
weixin: '710070994',
phone: '',
webviewStyles: {
progress: {
color: '#1A1929 '
}
}
};
},
onLoad() {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.isWeiXin = true;
}
// #endif
//获取客服二维码
this.$Request.getT('/app/common/type/289').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
console.log(res.data.value)
this.images = res.data.value;
}
}
});
this.$Request.getT('/app/common/type/288').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.weixin = res.data.value;
}
}
});
//获取手机号码
this.$Request.getT('/app/common/type/287').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.phone = res.data.value;
}
}
});
},
onPullDownRefresh: function() {
uni.stopPullDownRefresh(); // 停止刷新
},
methods: {
//邀请码复制
copyHref() {
uni.setClipboardData({
data: this.weixin,
success: r => {
this.$queue.showToast('复制成功');
}
});
},
saveImg() {
let that = this;
let imgArr = []
imgArr.push(that.image);
//预览图片
uni.previewImage({
urls: imgArr,
current: imgArr[0]
});
// uni.saveImageToPhotosAlbum({
// filePath: that.image,
// success(res) {
// that.$queue.showToast('保存成功');
// }
// });
},
rests() {
uni.showToast({
title: '已刷新请再次长按识别',
mask: false,
duration: 1500,
icon: 'none'
});
window.location.reload();
},
// 在线客服
goChat() {
let token = this.$queue.getData('token');
if (token) {
uni.navigateTo({
url: '/my/setting/chat'
});
} else {
this.goLoginInfo();
}
},
//统一登录跳转
goLoginInfo() {
uni.navigateTo({
url: '/pages/public/loginphone'
});
},
}
};
</script>
<style>
/* @import '../../static/css/index.css'; */
page {
background: #F5F5F5;
}
</style>