msb_beta
ch 3 years ago
parent b0ca5decbe
commit 1509ba5e3d

@ -0,0 +1,16 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 18:28:52
* @LastEditors: ch
* @LastEditTime: 2022-04-15 14:14:20
* @LastEditTime: 2022-04-25 19:24:25
* @Description: file content
*/
import Vue from 'vue'
@ -17,12 +17,14 @@ const
// 地址列表
ADDRESS = 'ads';
export default new Vuex.Store({
state : {
token : uni.getStorageSync(TOKEN) || '',
userInfo : JSON.parse(uni.getStorageSync(USER_INFO) || '{}'),
address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]')
address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]'),
sessionData : [],
sessionMsgData : {},
sessionMsgCount : 0
},
mutations:{
SET_TOKEN (state, token = ''){
@ -36,6 +38,15 @@ export default new Vuex.Store({
SET_ADDRESS (state, address = []){
state.address = address;
uni.setStorageSync(ADDRESS, JSON.stringify(address));
},
SET_SESSION_DATA (state, data){
state.sessionData = data ;
},
SET_SESSION_MSG_COUNT (state, data){
state.sessionMsgCount = data;
}
},
actions : {
}
})

@ -2,13 +2,15 @@
* @Author: ch
* @Date: 2022-03-22 16:52:28
* @LastEditors: ch
* @LastEditTime: 2022-03-22 17:26:44
* @LastEditTime: 2022-04-25 15:01:39
* @Description: 所有工具类统一在这输出
*/
import * as util from './utils';
import * as requset from './requset';
import * as websocket from './requset';
export * from './utils';
export * from './requset';
export * from './websocket';
export default { ...util, requset}
export default { ...util, ...requset, ...websocket}

@ -2,19 +2,19 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-04-22 16:37:06
* @LastEditTime: 2022-04-26 17:23:44
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
import MsbUniRequest from '@/common/plugins/msbUniRequest';
import $store from '@/common/store';
const ENV = 'test';
const ENV = 'prod';
const BASE_URL = {
'test' : 'https://k8s-horse-gateway.mashibing.cn',
'test' : 'https://like-app.mashibing.com/test',
// 'test' : '',
'release' : '',
'prod' : ''
'prod' : 'https://like-app.mashibing.com/'
};
/**
* 接口返回成功结果统一处理

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 19:15:10
* @LastEditors: ch
* @LastEditTime: 2022-04-24 19:00:20
* @LastEditTime: 2022-04-26 15:49:50
* @Description: 一些无法归类的公共方法容器
*/
@ -117,6 +117,28 @@ const formatDate = (date, fmt = 'yyyy/mm/dd' ) =>{
return fmt;
}
const createUUID = (len,radix) => {
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
let uuid = [],
i=0;
radix = radix || chars.length;
if(len){
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix];
}else{
let r = 0;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random()*16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join('');
}
// 工具类的文件需要把文件提供的工具类统一放最下方做一个统一输出
export {
// async await 标识结果处理
@ -132,5 +154,6 @@ export {
// 判断是否double或float
IsDouble,
// 时间格式化
formatDate
formatDate,
createUUID
}

@ -0,0 +1,106 @@
/*
* @Author: ch
* @Date: 2022-04-25 14:39:19
* @LastEditors: ch
* @LastEditTime: 2022-04-26 16:28:01
* @Description: file content
*/
import store from "../store";
import {createUUID, formatDate} from '@/common/utils';
export const MsbWebSkt = uni.connectSocket({
url : `ws://192.168.10.92:8090/ws?client=${store.state.token}`, // url是websocket连接ip
success: () => {
console.log('websocket连接成功')
},
fail: e => {
console.log('连接失败' + e)
}
});
MsbWebSkt.onClose(()=>{
console.log('WebSocket关闭...')
})
let sessionListFlag = false;
MsbWebSkt.onMessage((res)=>{
const data = JSON.parse(res.data || {});
if(data.code === 200){
const ctx = data.content;
switch(data.traceType){
// 会话列表
case 1 :
sessionListFlag = true;
// 来新消息先查会话列表是否一存在,存在则加消息数。不存在则向会话列表加一个会话框
ctx.sessionVOS.forEach(item => {
item.lastMessage.createTimeStamp = formatDate(item.lastMessage.createTimeStamp, 'mm-dd hh:ii')
item.lastMessage.payload = JSON.parse(item.lastMessage.payload || {});
let historyData = store.state.sessionData;
let hisIndex = historyData.findIndex(i => i.id === item.id);
if(hisIndex >= 0){
historyData[hisIndex].lastMessage = item.lastMessage;
historyData[hisIndex].unreadCount++;
store.commit('SET_SESSION_DATA', historyData);
}else{
item.messageList = [];
store.commit('SET_SESSION_DATA',[...historyData, item]);
}
});
// 消息总数
store.commit('SET_SESSION_MSG_COUNT', ctx.totalUnreadCount || 10);
break;
// 历史消息
case 2 :
let newData = store.state.sessionData;
const hisIdx = newData.findIndex(i => i.id === ctx[0].sessionId);
ctx.forEach(item => {
item.createTimeStamp = formatDate(item.createTimeStamp, 'mm-dd hh:ii')
item.payload = JSON.parse(item.payload)
})
newData[hisIdx].messageList = ctx.concat(newData[hisIdx].messageList);
store.commit('SET_SESSION_DATA', newData);
console.log(newData);
break;
// 会话消息
case 7 :
// 没接到会话列表时接到的消息不做处理
if(!sessionListFlag){
break;
}
// ctx.forEach(item => {
ctx.payload = JSON.parse(ctx.payload || {});
let historyData = store.state.sessionData;
const hisIndex = historyData.findIndex(i => i.id === ctx.sessionId);
store.commit('SET_SESSION_MSG_COUNT', store.state.sessionMsgCount + 1);
if(hisIndex >= 0){
// 存在会话往现有会话增加一条消息
const curHisData = historyData[hisIndex];
curHisData.messageList = [ ...(curHisData.messageList || []), ctx]
curHisData.unreadCount++;
store.commit('SET_SESSION_DATA', historyData);
}else{
// 会话列表不存在,则创建一个会话
store.commit('SET_SESSION_DATA',[...historyData, {
fromAvatar : ctx.fromAvatar,
fromId : ctx.fromId,
fromNickname : ctx.fromNickname,
id : ctx.id,
lastMessage : ctx,
messageList : [ctx],
unreadCount : 1
}]);
}
// });
break;
default :
break;
}
}
})
MsbWebSkt.onError(()=>{
console.log('WebSocket连接错误')
})

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.c85b1dd0.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.6ce2b378.js></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-account-message-list"],{"101d":function(t,e,n){var s=n("bc17");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var i=n("4f06").default;i("bb00a90e",s,!0,{sourceMap:!1,shadowMode:!1})},4783:function(t,e,n){"use strict";n("7db0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n("5767"),i={computed:{msgData:function(){var t=this,e=this.$store.state.sessionData.find((function(e){return e.id==t.$Route.query.id}));return e?e.messageList:[]}},onShow:function(){this.getHistoryMsg()},methods:{getHistoryMsg:function(){s.MsbWebSkt.send({data:JSON.stringify({traceId:(0,s.createUUID)(),traceType:"2",content:{sessionId:this.$Route.query.id}}),success:function(){console.log("suxx")},fail:function(t){console.log("fxx",t)}})},xx:function(){console.log(this.$store.state.sessionData)}}};e.default=i},6877:function(t,e,n){"use strict";var s=n("101d"),i=n.n(s);i.a},"7c81":function(t,e,n){"use strict";n.r(e);var s=n("a67d"),i=n("d9ce");for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("6877");var o,c=n("f0c5"),r=Object(c["a"])(i["default"],s["b"],s["c"],!1,null,"569529f2",null,!1,s["a"],o);e["default"]=r.exports},"82a3":function(t,e,n){t.exports=n.p+"static/img/xt.5199e39b.png"},a67d:function(t,e,n){"use strict";var s;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s}));var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-uni-view",t._l(t.msgData,(function(e){return s("v-uni-view",{key:e.id,staticClass:"msgItem"},[s("v-uni-view",{staticClass:"msgItem--title"},[s("v-uni-text",[t._v(t._s(e.payload.title))]),s("v-uni-text",{staticClass:"msgItem--time"},[t._v(t._s(e.createTimeStamp))])],1),s("v-uni-view",{staticClass:"msgItem--con"},[s("v-uni-image",{staticClass:"msgItem--img",attrs:{src:n("82a3"),mode:"widthFix"}}),s("v-uni-view",{staticClass:"msgItem--desc"},[t._v(t._s(e.payload.content))])],1)],1)})),1)},a=[]},bc17:function(t,e,n){var s=n("24fb");e=s(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.msgItem[data-v-569529f2]{padding:%?40?% 0 0 %?40?%}.msgItem--title[data-v-569529f2]{display:flex;justify-content:space-between;align-items:center;padding-right:%?40?%;font-size:%?32?%;color:#333}.msgItem--time[data-v-569529f2]{font-size:%?24?%;color:#999}.msgItem--con[data-v-569529f2]{display:flex;border-bottom:1px solid #eee;padding:%?40?% 0}.msgItem--img[data-v-569529f2]{width:%?140?%;height:%?140?%;border-radius:%?12?%;margin-right:%?40?%}.msgItem--desc[data-v-569529f2]{width:%?455?%;font-size:%?28?%;line-height:%?39?%;color:#666}',""]),t.exports=e},d9ce:function(t,e,n){"use strict";n.r(e);var s=n("4783"),i=n.n(s);for(var a in s)"default"!==a&&function(t){n.d(e,t,(function(){return s[t]}))}(a);e["default"]=i.a}}]);

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-account-message-list"],{4783:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={};n.default=i},"7c81":function(t,n,e){"use strict";e.r(n);var i=e("f0ee"),s=e("d9ce");for(var a in s)"default"!==a&&function(t){e.d(n,t,(function(){return s[t]}))}(a);e("9dd2");var d,r=e("f0c5"),c=Object(r["a"])(s["default"],i["b"],i["c"],!1,null,"065d0b7d",null,!1,i["a"],d);n["default"]=c.exports},"81fa":function(t,n,e){var i=e("24fb");n=i(!1),n.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.msgItem[data-v-065d0b7d]{padding:%?40?% 0 0 %?40?%}.msgItem--title[data-v-065d0b7d]{display:flex;justify-content:space-between;align-items:center;padding-right:%?40?%;font-size:%?32?%;color:#333}.msgItem--time[data-v-065d0b7d]{font-size:%?24?%;color:#999}.msgItem--con[data-v-065d0b7d]{display:flex;border-bottom:1px solid #eee;padding:%?40?% 0}.msgItem--img[data-v-065d0b7d]{width:%?140?%;height:%?140?%;border-radius:%?12?%;margin-right:%?40?%}.msgItem--desc[data-v-065d0b7d]{width:%?455?%;font-size:%?28?%;line-height:%?39?%;color:#666}',""]),t.exports=n},"9dd2":function(t,n,e){"use strict";var i=e("fad0"),s=e.n(i);s.a},d9ce:function(t,n,e){"use strict";e.r(n);var i=e("4783"),s=e.n(i);for(var a in i)"default"!==a&&function(t){e.d(n,t,(function(){return i[t]}))}(a);n["default"]=s.a},f0ee:function(t,n,e){"use strict";var i;e.d(n,"b",(function(){return s})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return i}));var s=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",t._l(5,(function(n){return e("v-uni-view",{key:n,staticClass:"msgItem"},[e("v-uni-view",{staticClass:"msgItem--title"},[e("v-uni-text",[t._v("退款消息")]),e("v-uni-text",{staticClass:"msgItem--time"},[t._v("03-23 00:00")])],1),e("v-uni-view",{staticClass:"msgItem--con"},[e("v-uni-view",{staticClass:"msgItem--desc"},[t._v("马士兵新款多线程与高并发专项训练突破课程书籍项训练突破课程书籍项训练突破")])],1)],1)})),1)},a=[]},fad0:function(t,n,e){var i=e("81fa");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=e("4f06").default;s("67633b16",i,!0,{sourceMap:!1,shadowMode:!1})}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2021-07-26 23:22:16
* @LastEditors: ch
* @LastEditTime: 2022-04-19 17:26:10
* @LastEditTime: 2022-04-26 16:14:07
* @Description: file content
*/
import Vue from 'vue';
@ -12,12 +12,34 @@ import {router,RouterMount} from '@/common/router/index.js';
import uView from 'uview-ui';
import store from '@/common/store';
import Confirm from '@/components/mount/index';
import {MsbWebSkt, createUUID} from '@/common/utils';
// 进入应用则向IM发起心跳包 以及获取IM会话数据
MsbWebSkt.onOpen(()=>{
MsbWebSkt.send({
data : JSON.stringify({
traceId : createUUID(),
traceType : "1",
content: { sysId : "1"}
})
});
setInterval(()=>{
MsbWebSkt.send({
data : JSON.stringify({
traceId : createUUID(),
traceType : "0",
content: { text : "ping"}
})
})
}, 5000)
});
Vue.use(router);
Vue.use(uView);
Vue.use(Confirm);
Vue.prototype.$store = store
Vue.prototype.$store = store;
Vue.config.productionTip = false;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 14:12:18
* @LastEditors: ch
* @LastEditTime: 2022-04-22 22:07:44
* @LastEditTime: 2022-04-26 10:51:50
* @Description: file content
-->
<template>
@ -47,11 +47,14 @@ export default {
data (){
return {
address : {},
oldPhone : '',
city : []
}
},
onShow(){
this.address = this.$store.state.address.find(i => i.id == this.$Route.query.id);
//
this.oldPhone = this.address.phone;
this.city = [
{code : this.address.provinceCode, name : this.address.province},
{code : this.address.cityCode, name : this.address.city},
@ -65,10 +68,16 @@ export default {
$toast('请填写收货人姓名');
return false;
}
if(this.oldPhone === this.address.phone){
//
delete this.address.phone;
}else{
if(!this.address.phone || !IsPhone(this.address.phone)){
$toast('请填写正确的手机号');
return false;
}
}
if(!this.city.length){
$toast('请选择地区');
return false;

@ -3,14 +3,15 @@
components: { UiCell },: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-04-22 18:25:50
* @LastEditTime: 2022-04-25 19:40:24
* @Description: file content
-->
<template>
<view>
<view class="header">
<u-badge class="header--badge" max="99" :value="9"></u-badge>
<image class="header--msg" src="@/static/account/xx.png" />
<u-badge class="header--badge" max="99" :value="$store.state.sessionMsgCount"
@click="$Router.push('/messageGroup')"></u-badge>
<image class="header--msg" @click="$Router.push('/messageGroup')" src="@/static/account/xx.png" />
</view>
<UiCell class="header--cell" :title="userInfo.nickname" label="第一个青春是上帝给的..."
@click="$Router.push('/setUserInfo')">

@ -2,22 +2,24 @@
* @Author: ch
* @Date: 2022-03-22 16:13:00
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:09:26
* @LastEditTime: 2022-04-25 19:34:58
* @Description: file content
-->
<template>
<view>
<BsEmpty tips="暂时还没有消息哦~" :icon="require('@/static/message/empty.png')" />
<view class="msgItem" v-for="item in 5" :key="item">
<BsEmpty tips="暂时还没有消息哦~" v-if="!$store.state.sessionData.length"
:icon="require('@/static/message/empty.png')" />
<view class="msgItem" v-for="item in $store.state.sessionData" :key="item.id"
@click="$Router.push(`/messageList?id=${item.id}`)">
<image class="msgItem--headImg" src="@/static/account/tx.png"></image>
<view class="msgItem--con">
<view>
<text class="msgItem--title">马士兵严选你的包裹已经到达菜鸟驿站</text>
<text class="msgItem--text">你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站你的包裹已经到达菜鸟驿站</text>
<text class="msgItem--title">{{item.fromNickname}}</text>
<text class="msgItem--text">{{item.lastMessage.payload.content}}</text>
</view>
<view class="msgItem--right">
<text class="msgItem--time">03-03 24:00</text>
<u-badge class="msgItem--badge" value="99"></u-badge>
<text class="msgItem--time">{{item.lastMessage.createTimeStamp}}</text>
<u-badge class="msgItem--badge" :value="item.unreadCount"></u-badge>
</view>
</view>
</view>
@ -26,7 +28,12 @@
<script>
import BsEmpty from '../../../components/BsEmpty.vue';
export default {
components: { BsEmpty }
components: { BsEmpty },
data (){
return {
sessionData : this.$store.state.sessionData
}
}
}
</script>
<style lang="scss" scoped>

@ -2,26 +2,59 @@
* @Author: ch
* @Date: 2022-03-26 14:32:03
* @LastEditors: ch
* @LastEditTime: 2022-04-15 18:32:58
* @LastEditTime: 2022-04-26 16:57:20
* @Description: file content
-->
<template>
<view>
<view class="msgItem" v-for="item in 5" :key="item">
<view class="msgItem" v-for="item in msgData" :key="item.id">
<view class="msgItem--title">
<text>退款消息</text>
<text class="msgItem--time">03-23 00:00</text>
<text>{{item.payload.title}}</text>
<text class="msgItem--time">{{item.createTimeStamp}}</text>
</view>
<view class="msgItem--con">
<!-- <image class="msgItem--img" src="@/static/testImg/3.png" mode="widthFix"/> -->
<view class="msgItem--desc">马士兵新款多线程与高并发专项训练突破课程书籍项训练突破课程书籍项训练突破</view>
<image class="msgItem--img" src="@/static/message/xt.png" mode="widthFix"/>
<view class="msgItem--desc">{{item.payload.content}}</view>
</view>
</view>
</view>
</template>
<script>
import {MsbWebSkt, createUUID} from '@/common/utils';
export default {
computed:{
msgData (){
// console.log(this.$store.state.sessionData,'---',this.$Route.query.id);
const sessionData = this.$store.state.sessionData.find(i =>i.id == this.$Route.query.id)
return sessionData ? sessionData.messageList : [];
}
},
onShow(){
this.getHistoryMsg();
},
methods:{
getHistoryMsg(){
// MsbWebSkt.onOpen(()=>{
MsbWebSkt.send({
data : JSON.stringify({
traceId : createUUID(),
traceType : "2",
content: { sessionId : this.$Route.query.id}
}),
success(){
console.log('suxx');
},
fail(e){
console.log('fxx',e);
}
})
// })
},
xx(){
console.log(this.$store.state.sessionData);
}
}
}
</script>
<style lang="scss" scoped>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 16:37:30
* @LastEditors: ch
* @LastEditTime: 2022-04-24 15:47:06
* @LastEditTime: 2022-04-25 17:39:41
* @Description: file content
-->
<template>
@ -31,10 +31,10 @@ export default {
label : '价格',
sort : 'ASC'
},
{
value : 'sales',
label : '销量'
},
// {
// value : 'sales',
// label : ''
// },
{
value : 'create_time',
label : '上新'

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-21 10:31:54
* @LastEditors: ch
* @LastEditTime: 2022-04-24 16:55:46
* @LastEditTime: 2022-04-25 17:45:36
* @Description: file content
-->
<template>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-21 11:29:38
* @LastEditors: ch
* @LastEditTime: 2022-04-24 15:39:13
* @LastEditTime: 2022-04-26 11:00:38
* @Description: file content
-->
<template>
@ -10,9 +10,10 @@
<UiPageHeader class="header">
<view slot="custom" class="search">
<u--input class="search--input" focus placeholder="请输入您想搜索的商品名称"
suffixIcon="search" ref="search" clearable suffixIconStyle="font-size:48rpx;color:#ccc"
v-model="searchValue" placeholderClass="search--input__placeholder"
@confirm="onSearch" />
clearable v-model="searchValue" @confirm="onSearch"
placeholderClass="search--input__placeholder">
<u-icon slot="suffix" @click="onSearch" name="search" color="#ccc" size="48rpx"></u-icon>
</u--input>
</view>
</UiPageHeader>
<view class="history" v-if="historyList.length">

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-04-21 22:01:41
* @LastEditTime: 2022-04-25 19:40:33
* @Description: file content
-->
<template>
@ -12,8 +12,8 @@
<view class="search search__min" v-if="scrollTop > 35" @click="$Router.push('/search')">
<text class="search--input">请输入您想搜索的商品名称</text>
</view>
<view class="msg">
<u-badge class="msg--badge" max="99" :value="0"></u-badge>
<view class="msg" @click="$Router.push('/messageGroup')">
<u-badge class="msg--badge" max="99" :value="$store.state.sessionMsgCount"></u-badge>
<image class="msg--icon" src="@/static/index/msg.png"></image>
</view>
</view>

@ -2,13 +2,14 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-04-24 17:45:41
* @LastEditTime: 2022-04-26 14:17:01
* @Description: file content
-->
<template>
<view>
<u-cell class="address" :border="false" isLink
@click="selectAddress">
<UiWhiteBox>
<u-cell class="address" :border="false" isLink @click="selectAddress">
<view slot="title" class="address--title">
{{address.province ? address.province + address.city + address.area : '请选择收货地址'}}
</view>
@ -18,6 +19,8 @@
<text>{{address.phone}}</text>
</view>
</u-cell>
</UiWhiteBox>
<view class="goods-group">
<view class="goods-group--item" v-for="item in orderInfo.products" :key="item.productId">
@ -35,14 +38,14 @@
</view>
</view>
<view class="service">
<UiWhiteBox>
<UiCell class="service--cell" title="配送方式" value="快递配送" :rightIcon="false"></UiCell>
<UiCell class="service--cell service--cell__last" title="买家留言" value="快递配送" :rightIcon="false">
<textarea slot="value" class="service--remark" auto-height v-model="userMessage"
maxlength="50" placeholder="填写您想要备注的信息50字以内" />
</UiCell>
</view>
<view class="play">
</UiWhiteBox>
<UiWhiteBox>
<text class="play--title">支付方式</text>
<radio-group>
<u-cell title="微信支付" :border="false" @click="payType = 'wxpay'">
@ -56,14 +59,12 @@
:checked="payType == 'alipay'"></radio>
</u-cell>
</radio-group>
</view>
</UiWhiteBox>
<view class="amount">
<UiWhiteBox class="amount">
<u-cell title="商品总额" :value="`¥${orderInfo.totalAmount}`" :border="false"></u-cell>
<u-cell title="运费" :value="`¥${orderInfo.shippingAmount}`" :border="false"></u-cell>
</view>
</UiWhiteBox>
<view class="footer">
<view class="footer--total">
@ -81,8 +82,9 @@
import UiCell from '@/components/UiCell';
import {ApiPostSubmitOrder, ApiPostWxPay, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/common/api/order';
import UiButton from '@/components/UiButton.vue';
import UiWhiteBox from '../../components/UiWhiteBox.vue';
export default {
components : {UiCell, UiButton },
components : {UiCell, UiButton, UiWhiteBox },
data(){
return {
address : {},
@ -201,7 +203,6 @@ page{
padding-bottom: 140rpx;
}
.address{
background: $color-grey0;
/deep/.u-cell__body__content{
padding: 10rpx 0;
@ -279,9 +280,8 @@ page{
}
.service{
background: $color-grey0;
margin: 20rpx 0;
&--cell{
border-radius: 16rpx;
padding: 0 30rpx;
&__last{
border: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Loading…
Cancel
Save