Merge branch 'dev1.0.0' into develop

msb_beta
ch 3 years ago
commit cfc8ffc2e2

@ -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 * @Author: ch
* @Date: 2022-03-22 18:28:52 * @Date: 2022-03-22 18:28:52
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-15 14:14:20 * @LastEditTime: 2022-04-25 19:24:25
* @Description: file content * @Description: file content
*/ */
import Vue from 'vue' import Vue from 'vue'
@ -17,12 +17,14 @@ const
// 地址列表 // 地址列表
ADDRESS = 'ads'; ADDRESS = 'ads';
export default new Vuex.Store({ export default new Vuex.Store({
state : { state : {
token : uni.getStorageSync(TOKEN) || '', token : uni.getStorageSync(TOKEN) || '',
userInfo : JSON.parse(uni.getStorageSync(USER_INFO) || '{}'), userInfo : JSON.parse(uni.getStorageSync(USER_INFO) || '{}'),
address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]') address : JSON.parse(uni.getStorageSync(ADDRESS) || '[]'),
sessionData : [],
sessionMsgData : {},
sessionMsgCount : 0
}, },
mutations:{ mutations:{
SET_TOKEN (state, token = ''){ SET_TOKEN (state, token = ''){
@ -36,6 +38,15 @@ export default new Vuex.Store({
SET_ADDRESS (state, address = []){ SET_ADDRESS (state, address = []){
state.address = address; state.address = address;
uni.setStorageSync(ADDRESS, JSON.stringify(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 * @Author: ch
* @Date: 2022-03-22 16:52:28 * @Date: 2022-03-22 16:52:28
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-03-22 17:26:44 * @LastEditTime: 2022-04-25 15:01:39
* @Description: 所有工具类统一在这输出 * @Description: 所有工具类统一在这输出
*/ */
import * as util from './utils'; import * as util from './utils';
import * as requset from './requset'; import * as requset from './requset';
import * as websocket from './requset';
export * from './utils'; export * from './utils';
export * from './requset'; export * from './requset';
export * from './websocket';
export default { ...util, requset} export default { ...util, ...requset, ...websocket}

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

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-17 19:15:10 * @Date: 2022-03-17 19:15:10
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-24 19:00:20 * @LastEditTime: 2022-04-26 15:49:50
* @Description: 一些无法归类的公共方法容器 * @Description: 一些无法归类的公共方法容器
*/ */
@ -16,7 +16,7 @@
* *
*/ */
const ToAsyncAwait = (promise, isFromatResult = true) => { const ToAsyncAwait = (promise, isFromatResult = true) => {
if(!isFromatResult){ if(!isFromatResult){
return promise; return promise;
}else{ }else{
return promise.then((res) => ({error:null,result:res})).catch((err) => ({error:err,result:null})); return promise.then((res) => ({error:null,result:res})).catch((err) => ({error:err,result:null}));
@ -117,6 +117,28 @@ const formatDate = (date, fmt = 'yyyy/mm/dd' ) =>{
return fmt; 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 { export {
// async await 标识结果处理 // async await 标识结果处理
@ -132,5 +154,6 @@ export {
// 判断是否double或float // 判断是否double或float
IsDouble, 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)')) <!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 * @Author: ch
* @Date: 2021-07-26 23:22:16 * @Date: 2021-07-26 23:22:16
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-19 17:26:10 * @LastEditTime: 2022-04-26 16:14:07
* @Description: file content * @Description: file content
*/ */
import Vue from 'vue'; import Vue from 'vue';
@ -12,12 +12,34 @@ import {router,RouterMount} from '@/common/router/index.js';
import uView from 'uview-ui'; import uView from 'uview-ui';
import store from '@/common/store'; import store from '@/common/store';
import Confirm from '@/components/mount/index'; 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(router);
Vue.use(uView); Vue.use(uView);
Vue.use(Confirm); Vue.use(Confirm);
Vue.prototype.$store = store Vue.prototype.$store = store;
Vue.config.productionTip = false; Vue.config.productionTip = false;

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

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

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

@ -2,26 +2,59 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-26 14:32:03 * @Date: 2022-03-26 14:32:03
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-15 18:32:58 * @LastEditTime: 2022-04-26 16:57:20
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view> <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"> <view class="msgItem--title">
<text>退款消息</text> <text>{{item.payload.title}}</text>
<text class="msgItem--time">03-23 00:00</text> <text class="msgItem--time">{{item.createTimeStamp}}</text>
</view> </view>
<view class="msgItem--con"> <view class="msgItem--con">
<!-- <image class="msgItem--img" src="@/static/testImg/3.png" mode="widthFix"/> --> <image class="msgItem--img" src="@/static/message/xt.png" mode="widthFix"/>
<view class="msgItem--desc">马士兵新款多线程与高并发专项训练突破课程书籍项训练突破课程书籍项训练突破</view> <view class="msgItem--desc">{{item.payload.content}}</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {MsbWebSkt, createUUID} from '@/common/utils';
export default { 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-04-12 17:33:42 * @Date: 2022-04-12 17:33:42
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-24 19:01:45 * @LastEditTime: 2022-04-25 11:56:49
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -11,8 +11,9 @@
<view class="seckill--price-box" v-if="activityStatus === 'noStartActivity'"> <view class="seckill--price-box" v-if="activityStatus === 'noStartActivity'">
<text class="seckill--price-icon"></text> <text class="seckill--price-icon"></text>
<text class="seckill--price">{{data.originalPrice}}</text> <text class="seckill--price">{{data.originalPrice}}</text>
<text class="seckill--price-icon"></text>
</view> </view>
<view class="seckill--price-box " v-else> <view class="seckill--price-box" v-else>
<text class="seckill--price-icon"></text> <text class="seckill--price-icon"></text>
<text class="seckill--price">{{data.activityPrice}}</text> <text class="seckill--price">{{data.activityPrice}}</text>
<text class="seckill--price-org">{{data.originalPrice}}</text> <text class="seckill--price-org">{{data.originalPrice}}</text>
@ -21,7 +22,7 @@
<view class="seckill--timer-title"> <view class="seckill--timer-title">
{{activityStatus === 'startActivity' ? '距结束仅剩' : '即将开始秒杀' }} {{activityStatus === 'startActivity' ? '距结束仅剩' : '即将开始秒杀' }}
</view> </view>
<view v-if="isDay" class="seckill--date">{{startDate}}</view> <view v-if="!isDay" class="seckill--date">{{startDate}}</view>
<view v-else class="seckill--timer"> <view v-else class="seckill--timer">
<view>{{hours}}</view> <view>{{hours}}</view>
<text>:</text> <text>:</text>
@ -141,32 +142,37 @@ export default {
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 20rpx 0 260rpx; padding: 0 20rpx 0 27rpx;
background-image: url('@/static/goods/seckill.png'); background-image: url('@/static/goods/seckill.png');
background-repeat : no-repeat; background-repeat : no-repeat;
background-size: 100%; background-size: 100%;
&__start{ &__start{
padding: 0 20rpx 0 108rpx; padding: 0 20rpx 0 108rpx;
background-image: url('@/static/goods/seckill_start.png'); background-image: url('@/static/goods/seckill_start.png');
.seckill--price-icon,.seckill--price{
color: $color-grey0;
}
} }
&--price-box{ &--price-box{
padding-top: 30rpx; padding-top: 30rpx;
} }
&--price-icon{ &--price-icon{
color: $color-grey0; color: $color-yellow4;
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
} }
&--price{ &--price{
color: $color-grey0; color: $color-yellow4;
font-weight: bold; font-weight: bold;
font-size: 50rpx; font-size: 50rpx;
margin-right: 10rpx;
} }
&--price-org{ &--price-org{
color: $color-grey0; color: $color-grey0;
text-decoration: line-through; text-decoration: line-through;
margin-left: 15rpx; margin-left: 6rpx;
} }
&--timer-title{ &--timer-title{
margin: 20rpx 0 10rpx 0; margin: 20rpx 0 10rpx 0;

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-24 11:30:55 * @Date: 2022-03-24 11:30:55
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-25 10:20:48 * @LastEditTime: 2022-04-25 14:16:35
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -11,7 +11,10 @@
<view class="product-info"> <view class="product-info">
<image class="product-info--img" src="https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/test/1.png"/> <image class="product-info--img" src="https://msb-edu-dev.oss-cn-beijing.aliyuncs.com/test/1.png"/>
<view> <view>
<view class="product-info--price">{{curSku.sellPrice}}</view> <view v-if="curSku.sellPrice" class="product-info--price">{{curSku.sellPrice}}</view>
<view v-else class="product-info--price">
{{activityStatus === 'startActivity' ? goodsInfo.productActivityVO.activityPrice : goodsInfo.startingPrice}}
</view>
<view class="product-info--sku">{{curSku.name}}</view> <view class="product-info--sku">{{curSku.name}}</view>
<view>库存{{curSku.stock}}</view> <view>库存{{curSku.stock}}</view>
</view> </view>
@ -172,6 +175,8 @@ export default {
this.$set(item,'active', !active); this.$set(item,'active', !active);
this.setDisabledItem(item, groupIndex); this.setDisabledItem(item, groupIndex);
this.$emit('input',this.curSku);
}, },
/** /**
* 每次点击选项属性时计算不可选属性 * 每次点击选项属性时计算不可选属性

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 17:27:21 * @Date: 2022-03-23 17:27:21
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-24 21:57:07 * @LastEditTime: 2022-04-25 14:07:04
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -24,7 +24,7 @@
</view> </view>
<view class="select"> <view class="select">
<Service></Service> <Service></Service>
<u-cell label="选择" :value="curSku.name" :border="false" isLink @click="onShowSkuPopup(1)"></u-cell> <u-cell label="选择" :value="curSku.name || '请选择规格'" :border="false" isLink @click="onShowSkuPopup(1)"></u-cell>
<SkuPopup v-model="curSku" :visible.sync="showSkuPopup" :mode="skuMode" <SkuPopup v-model="curSku" :visible.sync="showSkuPopup" :mode="skuMode"
:goodsInfo="goods" :skuInfo="skuInfoData" :activityStatus="activityStatus"> :goodsInfo="goods" :skuInfo="skuInfoData" :activityStatus="activityStatus">
</SkuPopup> </SkuPopup>

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

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

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

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

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

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-21 18:08:07 * @Date: 2022-03-21 18:08:07
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-24 17:11:09 * @LastEditTime: 2022-04-25 10:43:11
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -41,7 +41,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="loadingStatus" color="#fff" iconColor="#fff" nomoreText="我也是有底线的啦~"/> <u-loadmore :status="loadingStatus" color="#FF8384" iconColor="#FF8384" nomoreText="我也是有底线的啦~"/>
</view> </view>
</template> </template>
@ -123,7 +123,7 @@ page{
width: 750rpx; width: 750rpx;
} }
.tab{ .tab{
height:120rpx; height:116rpx;
margin: 20rpx 18rpx 0; margin: 20rpx 18rpx 0;
background: linear-gradient(180deg, #FDDBAE 0%, #FEC793 25%, #FFB378 97%, #FFB378 100%); background: linear-gradient(180deg, #FDDBAE 0%, #FEC793 25%, #FFB378 97%, #FFB378 100%);
display: flex; display: flex;
@ -132,6 +132,7 @@ page{
text-align: center; text-align: center;
position: relative; position: relative;
padding: 0 30rpx; padding: 0 30rpx;
border: 4rpx solid #FFB556;
&::after,&::before{ &::after,&::before{
display: block; display: block;
content: ''; content: '';
@ -141,11 +142,12 @@ page{
transform: rotate(180deg); transform: rotate(180deg);
background-size: 24rpx; background-size: 24rpx;
position: absolute; position: absolute;
right: 0; right: -4rpx;
top: -22rpx; top: -30rpx;
} }
&::before{ &::before{
left: 0; left: -4rpx;
top: -23rpx;
transform: rotate(0deg); transform: rotate(0deg);
} }
&--item{ &--item{
@ -153,13 +155,14 @@ page{
line-height: 45rpx; line-height: 45rpx;
text{ text{
color: #EF6817; color: #EF6817;
&.tab--time{
font-weight: bold;
}
} }
&__active text{ &__active text{
color: #F53739; color: #F53739;
} }
&__active .tab--time{
font-weight: bold;
}
} }
&--time{ &--time{
display: block; display: block;

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Loading…
Cancel
Save