Commit 5508f298 authored by xieyishang's avatar xieyishang

1111~

parent 6b0a429e
......@@ -33,7 +33,7 @@
<view @tap="catphone" class="iconsbtn">
<image class="iconsimg" src="/static/chat/telephony.png" mode=""></image>
</view>
<view @tap="toorderinfo" class="iconsbtn">
<view v-if="type==2" @tap="toorderinfo" class="iconsbtn">
<image class="iconsimg" src="/static/chat/ordericonss.png" mode=""></image>
</view>
</view>
......@@ -619,7 +619,7 @@
getGroupsInfofun() {
this.$store.dispatch("getGroupsInfo", {}).then((res) => {
if (res.groupInfoList.length != 0) {
this.groupInfodata = res.groupInfoList[0];
this.groupInfodata = res.groupInfoList[0].info;
}
});
},
......@@ -762,31 +762,30 @@
//查看订单
toorderinfo() {
console.info('查看订单详情');
return false;
let Merchantinfo = this.Merchantinfo;//商家
let shopid = '';
let shoptype = '';
let order_id = this.groupInfodata.customInfo.order_id;
let order_type = this.groupInfodata.customInfo.order_type;
let tourl = "";
if (Merchantinfo.customInfo) {
shoptype = Merchantinfo.customInfo.shoptype;
shopid = Merchantinfo.customInfo.shopid;
switch(shoptype) {
if (order_id) {
switch(order_type) {
case 'ele':
tourl = `/pages/takeout/takeout?id=${shopid}`
tourl = `/pages/order/detail/detail?id=${order_id}`
break;
case 'goods':
tourl = `/pages/shophome/shophome?id=${shopid}`
tourl = `/pages/order/shoporderdetail/shoporderdetail?order_id=${order_id}`
break;
case 'hotel':
tourl = `/pages/Hotel/Hoteldetails/Hoteldetails?hotel_id=${shopid}`
tourl = '/pages/hotelOrderDetaile/hotelOrderDetaile?order_id='+order_id+'&shop=shop'
break;
default:
}
if(tourl==''){
return false;
}
wx.navigateTo({
url: tourl,
})
}else{
this.$api.msg("商家信息有误");
this.$api.msg("信息有误");
}
},
//返回上一页
......
......@@ -25,9 +25,16 @@
<view class="list-cell m-t">
<text class="cell-tit">接收语音提醒</text>
<text class="cell-tit">接收订单提醒</text>
<switch :checked="ischecked" color="#ff6900" @change="switchChange" />
</view>
</view>
<view class="list-cell m-t">
<text class="cell-tit">接收消息提醒</text>
<switch :checked="isvoicemsg" color="#ff6900" @change="switchChangesmg" />
</view>
<navigator url="/pages/Course/Courselist" class="list-cell m-t" >
<text class="cell-tit">收不到语音提示?</text>
......@@ -129,13 +136,19 @@
version:"1.00",
ischeckedtwo:false,//店铺打烊情况
isshowdy:false,//是否显示打烊按钮
platform:'ios',
platform:'ios',
isvoicemsg:true,//是否打开消息提醒 短信消息
};
},
onLoad() {
this.platform=uni.getSystemInfoSync().platform;
this.getv();
this.storeEleInfofun();//查询外卖店铺详情信息
this.storeEleInfofun();//查询外卖店铺详情信息
let isvoicemsg = uni.getStorageSync("isvoicemsg");
if(isvoicemsg==-1){
this.isvoicemsg = false;
}
},
computed:{
//选中状态
......@@ -144,7 +157,9 @@
},
debug(){
return debug;
}
},
},
methods:{
......@@ -283,6 +298,18 @@
})
this.$store.commit("changeisvoice",e.detail.value);//直接修改 双向绑定的
},
//消息提醒
switchChangesmg(e){
// console.info(e,"eeee");
let val = e.detail.value;
if(val){
this.isvoicemsg = true;
uni.setStorageSync("isvoicemsg","")
}else{
this.isvoicemsg = false;
uni.setStorageSync("isvoicemsg","-1")
}
},
//店铺打烊
switchChangetwo(e){
......
......@@ -131,8 +131,7 @@ const Im_store = {
store.dispatch("getConversationList", {}).then(()=>{}); //刷新获取会话列表
} else {
store.dispatch("getConversationList", {}).then(()=>{}); //刷新获取会话列表
store.dispatch("messageTisfun", {}); //播放提醒消息
}
if(store.state.groupId==result.msg.groupId){
......@@ -579,7 +578,39 @@ const Im_store = {
})
});
},
//新消息提示
messageTisfun(){
console.info("语音消息提醒");
let isvoicemsg = uni.getStorageSync("isvoicemsg");
if(isvoicemsg=='-1'){
console.info("设置关闭了消息 不提示 !");
return false;
}
this.platform = uni.getSystemInfoSync().platform;
let src = 'https://runimg.jxdsy.cn/bank/msg_tips.mp3'
if(this.platform=='ios'){
const bgAudioMannager=uni.getBackgroundAudioManager();
bgAudioMannager.title = '鹿马消息提示...';
bgAudioMannager.singer = '小马将为你进行实时播报语音';
bgAudioMannager.coverImgUrl = 'https://runimg.jxdsy.cn/bank/logo.png';
bgAudioMannager.src = src;
bgAudioMannager.play();
bgAudioMannager.onEnded((res)=>{ //自然播放完毕
bgAudioMannager.pause(); //pause 暂停
});
}else{
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = src;
innerAudioContext.onPlay(() => { //音频播放时
uni.vibrateLong();//震动 调用//400ms//长震动
});
innerAudioContext.onError((res) => { //音频播放错误
console.log(res,'播放失败')
});
}
}
......
......@@ -364,6 +364,9 @@ const checkPhone = (phone)=>{
//时间戳解析多久前
const formatMsgTime = (timespan)=> {
if(!timespan){
return "";
}
timespan = timespan*1000;//
var dateTime = new Date(timespan) // 将传进来的字符串或者毫秒转为标准时间
var year = dateTime.getFullYear()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment