fix: 🐛 修改发现的代码bug

master
学习很差啦 2022-10-09 18:33:30 +08:00
parent 68ba97e590
commit 7dfdb4f685
3 changed files with 29 additions and 3 deletions

View File

@ -106,7 +106,7 @@ export default {
background-color: #fff;
position: fixed;
top: 0;
z-index: 99;
z-index: 9999;
box-shadow:0 0 10px 2px rgb(90 90 90 / 60%);
transition: 0.35s;
}

View File

@ -13,7 +13,7 @@
</div>
<div>
<span class="hover-pointer" @click="collect"><Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#fff'" />{{storeCollected?'已收藏店铺':'收藏店铺'}}</span>
<span style="width:80px" class="hover-pointer ml_10" @click="connectCs(storeMsg.yzfSign)"><Icon custom="icomoon icon-customer-service" />联系客服</span>
<span style="width:80px" class="hover-pointer ml_10" @click="IMService()"><Icon custom="icomoon icon-customer-service" />联系客服</span>
</div>
</div>
</div>
@ -78,6 +78,8 @@
import {getDetailById, getCateById} from '@/api/shopentry'
import { cancelCollect, collectGoods, isCollection } from '@/api/member';
import {goodsList} from '@/api/goods';
import { getIMDetail } from "@/api/common";
import Storage from "../plugins/storage";
export default {
name: 'Merchant',
data () {
@ -86,6 +88,7 @@ export default {
cateList: [], //
goodsList: [], //
total: 0, //
IMLink:"",
params: { //
pageNumber: 1,
pageSize: 20,
@ -103,6 +106,30 @@ export default {
this.getGoodsList()
},
methods: {
// im
async IMService() {
// 访Token
let accessToken = Storage.getItem("accessToken");
await this.getIMDetailMethods();
if (!accessToken) {
this.$Message.error("请登录后再联系客服");
return;
}
window.open(
this.IMLink +
"?token=" +
accessToken +
"&id=" +
this.storeMsg.storeId
);
},
// im
async getIMDetailMethods() {
let res = await getIMDetail();
if (res.success) {
this.IMLink = res.result;
}
},
getStoreMsg () { //
getDetailById(this.$route.query.id).then(res => {
if (res.success) {

View File

@ -244,7 +244,6 @@
<Modal v-model="qrcodeShow" title="分销商品" width="800">
<Alert type="warning"> 下载二维码或者复制链接分享商品 </Alert>
<div style="width: 200px; height: 200px; border: 1px solid #eee">
{{qrcode}}{{qrcodeData}}
<vue-qr
:text="qrcode"
:callback="qrcodeData"