This commit is contained in:
zmj 2024-04-29 23:05:49 +08:00
parent 0aed25b996
commit 448733a1c8
3 changed files with 135 additions and 118 deletions

33
App.vue
View File

@ -1,6 +1,6 @@
<script> <script>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | CRMEB [ CRMEB ] // | CRMEB [ CRMEB ]
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
@ -16,7 +16,9 @@
checkLogin checkLogin
} from "./libs/login"; } from "./libs/login";
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { import {
parseToken parseToken
@ -89,6 +91,16 @@
// //
console.log('消息成功' + JSON.stringify(option)); console.log('消息成功' + JSON.stringify(option));
}); });
uni.onHostEventReceive((event, data) => {
if (event == 'tocustomlist') {
uni.switchTab({
url: '/pages/chat/customer_list/index'
});
}
});
// #endif // #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'; this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
@ -120,6 +132,10 @@
if (option?.referrerInfo?.extraData?.uniMP) { if (option?.referrerInfo?.extraData?.uniMP) {
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP); uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.token,
// 'time': 604800
// });
parseToken({ parseToken({
token: option.referrerInfo?.extraData?.token token: option.referrerInfo?.extraData?.token
}).then((res) => { }).then((res) => {
@ -133,6 +149,7 @@
'token': option.referrerInfo?.extraData?.token, 'token': option.referrerInfo?.extraData?.token,
'time': 604800 'time': 604800
}); });
console.log('TOKEN解析错误:', err);
this.$isResolve() this.$isResolve()
}) })
} else { } else {
@ -405,8 +422,7 @@
//console.log('App Hide') //console.log('App Hide')
}, },
watch: { watch: {
// https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/40390202404250914319725.mp4 // H5
// H5?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast
$route(n) { $route(n) {
if (this.$store.state.app.token) { if (this.$store.state.app.token) {
// //
@ -428,21 +444,10 @@
@import 'static/css/style.scss'; @import 'static/css/style.scss';
//
* {
scrollbar-color: #e5e5e500 #f7f7f9 !important;
}
view { view {
box-sizing: border-box; box-sizing: border-box;
} }
.c_active {
&:active {
opacity: .8;
}
}
.custom_style { .custom_style {
color: #fff; color: #fff;
display: flex; display: flex;

View File

@ -12,7 +12,8 @@
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view> <view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view> <view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view> <view class="con line1" v-if="item.last && item.last.msn_type == 4">[商品]</view>
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view> <view class="con line1"
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
</view> </view>
<view class="right-box"> <view class="right-box">
<view class="time">{{item.last && item.last.create_time.split(' ')[1] || ''}}</view> <view class="time">{{item.last && item.last.create_time.split(' ')[1] || ''}}</view>
@ -23,15 +24,18 @@
<block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index"> <block v-if="type == 1 && list.length>0" v-for="(item,index) in list" :key="index">
<div class="item acea-row" @click="goPage(item)"> <div class="item acea-row" @click="goPage(item)">
<view class="logo"> <view class="logo">
<image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'" mode=""></image> <image :src="(item.user && item.user.avatar) ? item.user.avatar : '/static/images/f.png'"
mode=""></image>
</view> </view>
<view class="info"> <view class="info">
<view class="name">{{item.user && item.user.nickname}}</view> <view class="name">{{item.user && item.user.nickname}}</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view> <view class="con line1" v-if="item.last && item.last.msn_type == 1">{{item.last.msn}}</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view> <view class="con line1" v-if="item.last && item.last.msn_type == 2">[表情]</view>
<view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view> <view class="con line1" v-if="item.last && item.last.msn_type == 3">[图片]</view>
<view class="con line1" v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view> <view class="con line1"
<view class="con line1" v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view> v-if="item.last && (item.last.msn_type == 4 || item.last.msn_type == 7)">[商品]</view>
<view class="con line1"
v-if="item.last && (item.last.msn_type == 5 || item.last.msn_type == 6)">[订单]</view>
</view> </view>
<view class="right-box"> <view class="right-box">
<view class="time">{{item.last && item.last.create_time.split(' ')[1]}}</view> <view class="time">{{item.last && item.last.create_time.split(' ')[1]}}</view>
@ -65,7 +69,9 @@
import { import {
getUserInfo getUserInfo
} from '@/api/user.js'; } from '@/api/user.js';
import { mapGetters } from "vuex"; import {
mapGetters
} from "vuex";
export default { export default {
name: "CustomerList", name: "CustomerList",
components: { components: {
@ -91,7 +97,6 @@
computed: mapGetters(['isLogin', 'viewColor']), computed: mapGetters(['isLogin', 'viewColor']),
onLoad(optios) { onLoad(optios) {
this.type = optios.type || 1; this.type = optios.type || 1;
this.getindex()
}, },
onShow(option) { onShow(option) {
if (this.isLogin) { if (this.isLogin) {
@ -100,6 +105,7 @@
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
} }
this.getindex()
}, },
onHide() { onHide() {
if (this.timer) { if (this.timer) {
@ -248,6 +254,7 @@
transform: rotate(180deg); transform: rotate(180deg);
font-size: 36rpx; font-size: 36rpx;
} }
.popupn { .popupn {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -258,17 +265,20 @@
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;
z-index: 100; z-index: 100;
.title { .title {
max-width: 560rpx; max-width: 560rpx;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
.iconfont { .iconfont {
display: inline-block; display: inline-block;
position: relative; position: relative;
top: 4rpx; top: 4rpx;
right: 0; right: 0;
} }
.mer_logo { .mer_logo {
width: 34rpx; width: 34rpx;
height: 34rpx; height: 34rpx;
@ -276,36 +286,44 @@
top: 6rpx; top: 6rpx;
right: 10px; right: 10px;
} }
.mer_name { .mer_name {
display: inline-block; display: inline-block;
max-width: 650rpx; max-width: 650rpx;
} }
.invoice-content { .invoice-content {
background-color: #ffffff; background-color: #ffffff;
} }
} }
.list_count { .list_count {
margin-top: 104rpx; margin-top: 104rpx;
} }
.item { .item {
align-items: center; align-items: center;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #fff; background-color: #fff;
.logo image { .logo image {
width: 88rpx; width: 88rpx;
height: 88rpx; height: 88rpx;
border-radius: 50%; border-radius: 50%;
} }
.info { .info {
width: 334rpx; width: 334rpx;
margin-left: 20rpx; margin-left: 20rpx;
.con { .con {
margin-top: 10rpx; margin-top: 10rpx;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.right-box { .right-box {
flex: 1; flex: 1;
display: flex; display: flex;
@ -313,9 +331,11 @@
align-items: flex-end; align-items: flex-end;
font-size: 20rpx; font-size: 20rpx;
color: #BBBBBB; color: #BBBBBB;
.time { .time {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.num { .num {
min-width: 6px; min-width: 6px;
background-color: var(--view-theme); background-color: var(--view-theme);

View File

@ -17,10 +17,8 @@
</u-form-item> </u-form-item>
<view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;"> <view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;">
<view class="" style="display: flex;flex-wrap: wrap;"> <view class="" style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in formData.imageList" <view v-for="(item,index) in formData.imageList"
style="margin-right: 20rpx;margin-bottom: 20rpx;"> style="margin-right: 20rpx;margin-bottom: 20rpx;">
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'> <view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
<view class="video_list_item photo" style="position: relative;"> <view class="video_list_item photo" style="position: relative;">
<view class="jiao"> <view class="jiao">
@ -46,8 +44,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="" style="position: relative;" v-else> <view class="" style="position: relative;" v-else>
<view class="jiao" @click="formData.imageList.splice(index,1)"> <view class="jiao" @click="formData.imageList.splice(index,1)">
<image src="@/static/images/gban.png" mode="widthFix"></image> <image src="@/static/images/gban.png" mode="widthFix"></image>
@ -57,10 +53,7 @@
</view> </view>
</view> </view>
<view class='uploadimg' @click="show=true,isDetail=false"> <view class='uploadimg' @click="show=true,isDetail=false">
<!-- <view class='uploadimg'> -->
<u-icon name="plus" color="#777777"></u-icon> <u-icon name="plus" color="#777777"></u-icon>
<view class="" style="color: #777777;font-size: 20rpx;"> <view class="" style="color: #777777;font-size: 20rpx;">
上传图片/视频 上传图片/视频
@ -823,7 +816,6 @@
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx 0; padding: 20rpx 0;
/* margin-left: 20rpx; */
overflow: hidden; overflow: hidden;
} }