diff --git a/components/VNavigationBar.vue b/components/VNavigationBar.vue
index 9f4aebc..1cdd4a4 100644
--- a/components/VNavigationBar.vue
+++ b/components/VNavigationBar.vue
@@ -17,10 +17,13 @@
{{ title }}
+
+
+
@@ -45,6 +48,10 @@
leftTitle: {
type: Boolean,
default: false
+ },
+ showClear: {
+ type: Boolean,
+ default: false
}
},
mounted() {
@@ -77,7 +84,10 @@
methods: {
back() {
uni.navigateBack()
- }
+ },
+ clearNoReadFun(){
+ this.$emit('clearNoRead')
+ }
}
}
@@ -108,5 +118,13 @@
font-size: 36rpx;
font-weight: bold;
}
+ .navigationBarIcon {
+ display: flex;
+ }
+ .clear-icon{
+ width: 40rpx;
+ height: 40rpx;
+ border-radius: 50%;
+ }
}
-
\ No newline at end of file
+
diff --git a/pages-home/home/content.vue b/pages-home/home/content.vue
index f59a1ea..1759bf6 100644
--- a/pages-home/home/content.vue
+++ b/pages-home/home/content.vue
@@ -11,7 +11,7 @@
- 参与
活动
+ 参与
活动
@@ -33,7 +33,8 @@ export default {
},
data() {
return {
- richTextHtml: ''
+ richTextHtml: '',
+ toUrl:null,
};
},
onLoad(data) {
@@ -49,10 +50,9 @@ export default {
})
const data = res.data
this.richTextHtml = data.content
- // this.richTextHtml = data.content.replace(/(]+src=")([^":]*?)(")/g, (match, p1, p2, p3) => {
- // return `${p1}${config.baseImageUrl}/${p2}${p3}`;
- // });
- // this.richTextHtml = `data:text/html;charset=utf-8,${encodeURIComponent(this.richTextHtml)}`
+ if(data.toUrl){
+ this.toUrl = data.toUrl
+ }
}catch {}
},
toActivity(){
diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue
index 9e2a7ad..1d2b50a 100644
--- a/pages-home/home/home.vue
+++ b/pages-home/home/home.vue
@@ -23,7 +23,7 @@
-
+
@@ -78,11 +78,11 @@
icon: require('@/static/icons/homeMenuIcon/menu2.png'),
path: '/pages/myCar/myCar'
},
- {
- title: '活动礼包',
- icon: require('@/static/icons/homeMenuIcon/menu3.png'),
- path: '/pages-home/home/active'
- },
+ // {
+ // title: '活动礼包',
+ // icon: require('@/static/icons/homeMenuIcon/menu3.png'),
+ // path: '/pages-home/home/active'
+ // },
{
title: '操作指南',
icon: require('@/static/icons/homeMenuIcon/menu4.png'),
@@ -98,28 +98,6 @@
title: '车辆机件“焕新上岗”,武汉公交修旧创效出实招'
},
],
- // shopList: [{
- // id: 1,
- // title: '顺捷汽车维修搭电救援补胎中心',
- // address: '济南市历下区福瑞达历下护理院东南门旁',
- // distance: '1.9km',
- // image: ''
- // },
- // {
- // id: 2,
- // title: '顺捷汽车维修搭电救援补胎中心',
- // address: '济南市历下区福瑞达历下护理院东南门旁',
- // distance: '1.9km',
- // image: ''
- // },
- // {
- // id: 3,
- // title: '顺捷汽车维修搭电救援补胎中心',
- // address: '济南市历下区福瑞达历下护理院东南门旁',
- // distance: '1.9km',
- // image: ''
- // },
- // ]
shopList: [],
bannerList: [],
richTextHtml: null
@@ -128,8 +106,29 @@
onShow() {
this.getCompanyPage()
this.getBannerList()
+ this.getNoticeList()
},
methods: {
+ /**
+ * 查通知公告
+ */
+ async getNoticeList(){
+ const res = await request({
+ url: "/app-api/base/notice/pageList",
+ method: "get",
+ params: {
+ pageNo:1,
+ pageSize:2,
+ type:1,
+ parentServer: "weixiu",
+ server: "wx"
+ },
+ tenantIdFlag:false
+ })
+ if(res.code==200){
+ this.infoList = res.data.records
+ }
+ },
swiperChangeFun(e) {
console.log('e', e)
this.bannerIndex = e.detail.current
@@ -149,6 +148,14 @@
item.url = config.baseImageUrl + item.url
})
},
+ /**
+ * 跳转通知公告列表页
+ */
+ gotoNotice(){
+ uni.navigateTo({
+ url: '/pages-shop/notice/notice'
+ })
+ },
gotoShopDetail(row) {
setJSONData("shopInfo",row)
// 直接把那一行的数据转发过去
diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue
index 2a384c8..a4a58a7 100644
--- a/pages-order/orderDetail/orderDetail.vue
+++ b/pages-order/orderDetail/orderDetail.vue
@@ -83,11 +83,11 @@
联系方式
- {{ ticketInfo.userMobile }}
+ {{ ticketInfo.userMobile || "" }}
生日
- {{ ticketInfo.birthday }}
+ {{ ticketInfo.birthday || "" }}
@@ -109,14 +109,14 @@
{{ item.itemName }}
- ¥{{ item.itemMoney }}
+ ¥{{ item.itemMoney }}
- 售价:{{ item.itemPrice }}
- 数量:{{ item.itemCount }}
- 单位:{{ item.itemUnit}}
- 折扣:{{ item.itemDiscount }}
- 金额:{{ item.itemMoney }}
+ 售价:{{ item.itemPrice || "" }}
+ 数量:{{ item.itemCount || "" }}
+
+ 折扣:{{ item.itemDiscount || "" }}
+ 金额:{{ item.itemMoney || "" }}
-
+
维修配件
@@ -154,14 +154,14 @@
{{ item.itemName }}
- ¥{{ item.itemMoney }}
+ ¥{{ item.itemMoney }}
- 售价:{{ item.itemPrice }}
- 数量:{{ item.itemCount }}
- 单位:{{ item.itemUnit}}
- 折扣:{{ item.itemDiscount }}
- 金额:{{ item.itemMoney }}
+ 售价:{{ item.itemPrice || "" }}
+ 数量:{{ item.itemCount || "" }}
+ 单位:{{ getItemUnit(item.itemUnit) || "" }}
+ 折扣:{{ item.itemDiscount || "" }}
+ 金额:{{ item.itemMoney || "" }}
@@ -186,8 +186,8 @@
{{ item.remark }}
-
+
@@ -221,7 +221,7 @@
data() {
return {
ticketsId: null,
- ticketInfo:{},
+ ticketInfo:null,
carInfo: {},
userInfo: {},
imgUrlPrex:config.baseImageUrl,
@@ -234,6 +234,19 @@
this.getTicketsInfo()
},
methods: {
+ /**
+ * 预览图片
+ */
+ prviewImage(imgList, index) {
+ let urls = []
+ imgList.forEach(i => {
+ urls.push(this.imgUrlPrex+i.image)
+ })
+ uni.previewImage({
+ urls: urls,
+ current: index
+ });
+ },
gotoEvaluate() {
uni.navigateTo({
url: '/pages-order/orderDetail/evaluate'
@@ -250,6 +263,10 @@
item.typeStr = "未知数据"
}
item.createTime = formatTimestamp(item.createTime)
+ let canReadImg =item.itemList.filter((img)=>{
+ return img.isOpen=='1'
+ })
+ item.itemList = canReadImg
})
this.ticketInfo = resultObj
},
@@ -307,7 +324,40 @@
})
}
},
-
+ //翻译配件单位
+ getItemUnit(unitCode){
+ if(unitCode){
+ let dictArray = getStorageWithExpiry("repair_unit");
+ if(null==dictArray || undefined==dictArray){
+ request({
+ url: '/app-api/system/dict-data/type',
+ method: 'get',
+ tenantIdFlag:false,
+ params:{type:"repair_unit"}
+ }).then((res) => {
+ console.log(res)
+ if (res.code == 200) {
+ setStorageWithExpiry("repair_unit",res.data,3600)
+ let dictObj = dictArray.find(dict => dict.value == unitCode)
+ console.log(dictObj, "dictObj")
+ if (dictObj) {
+ return dictObj.label
+ } else {
+ return "未知数据"
+ }
+ }
+ })
+ }else{
+ let dictObj = dictArray.find(dict => dict.value == unitCode)
+ console.log(dictObj, "dictObj")
+ if (dictObj) {
+ return dictObj.label
+ } else {
+ return "未知数据"
+ }
+ }
+ }
+ }
}
diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue
index 18d5d24..944b04c 100644
--- a/pages-order/orderList/orderList.vue
+++ b/pages-order/orderList/orderList.vue
@@ -18,8 +18,8 @@
订单编号:{{ item.orderNo }}
-
- {{ getStatus(item.orderStatus) }}
+
+ {{ getStatus(item.orderStatus,item.mainStatus,item.payType) }}
@@ -30,16 +30,16 @@
{{ item.tenantName || "蓝安-中鑫之宝" }}
-
-
+
+
共计
¥
{{ item.payMoney }}
- {{ formatTimestamp(item.createTime) }}
+ {{ formatTimestamp(item.createTime) }}
- 支付
+ 支付
查看订单
评价订单
@@ -71,6 +71,7 @@ import request from '../../utils/request';
import VNavigationBar from '@/components/VNavigationBar.vue'
import tabBarVue from '@/components/tabBar/tabBar.vue'
import drawQrcode from 'weapp-qrcode';
+import {getToken,getUserInfo} from '@/utils/auth'
export default {
components: {
@@ -82,18 +83,23 @@ export default {
payShow: false,
activeKey: 0,
imageUrl: '',
- tabList: [{
- id: 0,
- title: '全部订单'
- },
+ tabList: [
+ {
+ id: 0,
+ title: '维修中'
+ },
{
id: 1,
- title: '维修中'
+ title: '待支付'
},
{
id: 2,
title: '待评价'
},
+ {
+ id: 3,
+ title: '全部订单'
+ },
],
orderList: [],
pageNo: 1,
@@ -105,8 +111,14 @@ export default {
}
},
onLoad() {
- this.orderList = []
- this.getList()
+ if(!getToken()){
+ uni.reLaunch({
+ url: '/pages/login/login'
+ })
+ }else {
+ this.orderList = []
+ this.getList()
+ }
},
methods: {
formatTimestamp(timestamp) {
@@ -153,12 +165,16 @@ export default {
}
switch (this.activeKey) {
case 0:
+ //维修中
+ data.selectType = "working"
break;
case 1:
- data.status = "06"
+ //待支付
+ data.selectType = "waitingPay"
break;
case 2:
- data.status = '00'
+ //待评价
+ data.selectType = 'waitingComment'
break
default:
break
@@ -193,15 +209,45 @@ export default {
this.total = 0
this.getList()
},
- getStatus(status) {
- switch (status) {
- case '0':
- return '待支付'
- case '1':
- return '已支付'
- default:
- break;
+ /**
+ * 获取工单的状态
+ * @param orderStatus 订单是否支付 0未支付 1已支付
+ * @param mainStatus 工单主状态
+ * @param payType 支付方式
+ * @returns {string}
+ */
+ getStatus(orderStatus,mainStatus,payType) {
+ let str = "";
+ if("0"==orderStatus){
+ //未支付的情况下,返回工单的状态
+ if("04"==mainStatus){
+ //待派工
+ str = "待派工"
+ }else if("05"==mainStatus){
+ //维修中
+ str = "维修中"
+ }else if("01"==mainStatus){
+ //待结算
+ if(!payType){
+ str = "待结算"
+ }else{
+ str = "待支付"
+ }
+ }else if("06"==mainStatus){
+ //挂单/记账
+ str = "挂单/记账"
+ }else if("02"==mainStatus){
+ //已结账
+ str = "已结账"
+ }else if("03"==mainStatus){
+ //已作废
+ str = "已作废"
+ }
+ }else{
+ //已支付
+ str = "已支付"
}
+ return str;
},
async goPay(data) {
let that = this
@@ -256,10 +302,6 @@ export default {
uni.navigateTo({
url: '/pages-order/orderDetail/orderDetail?ticketsId=' + row.goodsId
})
- }else {
- uni.navigateTo({
- url: '/pages-order/orderDetail/orderDetail'
- })
}
},
gotoEvaluate(row) {
diff --git a/pages-shop/notice/notice.vue b/pages-shop/notice/notice.vue
new file mode 100644
index 0000000..7b6337d
--- /dev/null
+++ b/pages-shop/notice/notice.vue
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{formatTime(item.createTime)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages-shop/notice/noticeContent.vue b/pages-shop/notice/noticeContent.vue
new file mode 100644
index 0000000..a7de3e7
--- /dev/null
+++ b/pages-shop/notice/noticeContent.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 564bad6..ed68b3a 100644
--- a/pages.json
+++ b/pages.json
@@ -145,6 +145,18 @@
"style": {
"navigationBarTitleText": ""
}
+ },
+ {
+ "path": "notice/notice",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "notice/noticeContent",
+ "style": {
+ "navigationBarTitleText": ""
+ }
}
]
},
diff --git a/pages/my/message.vue b/pages/my/message.vue
index 14914c2..498267f 100644
--- a/pages/my/message.vue
+++ b/pages/my/message.vue
@@ -1,15 +1,16 @@
-
+
-
+
- 系统通知
- 节日快乐!在这美好的时刻,送上我最真挚的祝福:愿你的每一天都充满阳光和欢笑,每一步都走向成功和辉煌。
+ 系统通知
+ {{item.templateContent}}
+ {{formatTime(item.createTime)}}
@@ -18,11 +19,21 @@
+
+
+
+
@@ -102,11 +168,12 @@
flex-direction: column;
.body {
flex: 1;
- height: 0;
+ height: calc(100vh - env(safe-area-inset-top));
overflow: auto;
}
.messageList {
padding: 0 32rpx;
+ height: 100%;
}
.messageItem {
padding: 30rpx 0;
@@ -119,13 +186,25 @@
width: 80rpx;
height: 80rpx;
}
+ .noReadTitle {
+ font-weight: bold;
+ font-size: 32rpx;
+ color: #333333;
+ }
+ .noReadTitle:after{
+ content: "*";
+ color: red;
+ display: block; /* 或者其他的块级显示类型,比如 inline-block, table 等 */
+ position: absolute; /* 或者 absolute 或者 fixed,取决于你的布局需求 */
+ z-index: 1; /* 确保它在元素的上方 */
+ right: 0;
+ }
.messageContent {
flex: 1;
width: 0;
}
.messageTitle {
- font-weight: bold;
font-size: 32rpx;
color: #333333;
}
@@ -138,6 +217,32 @@
white-space: nowrap;
text-overflow: ellipsis;
}
- }
+ }
+ .popup-content {
+ padding: 15px;
+ height: auto;
+ margin: auto;
+ width: 80%;
+ background-color: #fff;
+ }
+ .popup-content-text {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .text {
+ color: #333;
+ }
+
+ .popup-info {
+ margin-top: 30rpx;
+ color: #fff;
+ background-color: #f2f6fc;
+ }
+
+ .info-text {
+ color: #909399;
+ }
}
diff --git a/pages/my/my.vue b/pages/my/my.vue
index aba5287..f62e077 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -43,9 +43,6 @@
@@ -54,6 +51,9 @@
@@ -82,6 +82,8 @@
console.log("已登录")
//直接取缓存中的用户信息
this.customInfo = JSON.parse(getUserInfo())
+ //查未读消息数量
+ this.getNoReadNum()
}
},
data() {
@@ -96,9 +98,10 @@
],
menuCard2: [
{ title: '消息中心', icon: require('@/static/icons/my-menu-icon2.png'), path: '/pages/my/message' },
- { title: '客服中心', icon: require('@/static/icons/my-menu-icon4.png') },
+ // { title: '客服中心', icon: require('@/static/icons/my-menu-icon4.png') },
{ title: '操作指南', icon: require('@/static/icons/my-menu-icon5.png'), path: "/pages/guideList/guideList" },
- ]
+ ],
+ noReadNum:0
}
},
methods: {
@@ -112,6 +115,17 @@
url: '/pages/my/myEquity'
})
},
+ async getNoReadNum(){
+ await request({
+ url: "/app-api/system/notify-message/get-unread-count",
+ method: "GET",
+ tenantIdFlag:false
+ }).then((res) => {
+ if(res.code==200){
+ this.noReadNum = res.data
+ }
+ })
+ }
}
}
diff --git a/static/images/clear.png b/static/images/clear.png
new file mode 100644
index 0000000..2c0f153
Binary files /dev/null and b/static/images/clear.png differ