Commit be11165d authored by home's avatar home

zxf

parent be646ba3
<script>
const bgAudioMannager = uni.getBackgroundAudioManager();
const platform=uni.getSystemInfoSync().platform;
const time='';
const time='';
import {newsRemind} from "@/utils/api/api.js";//获取商家消息
export default {
......@@ -17,7 +17,6 @@
bgAudioMannager.pause(); //pause 暂停
});
}
// #ifdef APP-PLUS
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
......@@ -56,47 +55,86 @@
}
},
methods:{
hgServiceFun(){
const hgService = uni.requireNativePlugin("HG-Background"); //初始化
hgService.config({
title:"鹿马商家助手",
content:"小鹿正在为您进行实时播报...",
mode: 1, //0省电模式 1流氓模式
});
// hgServiceFun(){
// const hgService = uni.requireNativePlugin("HG-Background"); //初始化
// hgService.config({
// title:"鹿马商家助手",
// content:"小鹿正在为您进行实时播报...",
// mode: 1, //0省电模式 1流氓模式
// });
var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
// var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
if(rsult.isLimit){ //限制了后台运行
hgService.requestIgnoreLimit(); //申请允许后台运行
// if(rsult.isLimit){ //限制了后台运行
// hgService.requestIgnoreLimit(); //申请
}else{ //没有限制后台运行
console.log('没有限制');
hgService.startService(); //启动前台服务
//hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
// }
// // console.log('没有限制');
// hgService.startService(); //启动前台服务
// // hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,opp,vivo,三星,乐视,魅族
// //var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
// },
hgServiceFun(){
const pushLive = uni.requireNativePlugin('push-live');
pushLive.startService({ //启动服务
title: "鹿马商家助手",
content: "小鹿正在为您进行实时播报...",
mode: 1 //0省电模式 1流氓模式
}, function(res) {
console.log(res)
});
pushLive.isIgnoringBatteryOptimizations(function(res) { //是否添加到白名单中
if(res.flag){ //添加进去了
//pushLive.gotoWhiteListSetting();
}else{
pushLive.requestIgnoreBatteryOptimizations(); //申请加入白名单
}
//var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
})
var globalEvent = uni.requireNativePlugin('globalEvent');
globalEvent.addEventListener('doJobEvent', function() {
console.log("我被定时启动了。。。。。。。。。。。。。。。。。")
});
console.log(globalEvent)
},
//获取 语音消息
async getnewsRemind(type){
var date = new Date();
let hours = date.getHours();//当前 时间 小时
let datestime = 5000;//默认15秒
let datestime = 5000;//默认15秒
if(this.$store.state.token!=""){//判断是否 已登录
//#ifdef APP-PLUS
let cid = plus.push.getClientInfo().clientid
//#endif
console.log('这里')
let res = await newsRemind({
uid:this.$store.state.userInfo.user_id,
cid:plus.push.getClientInfo().clientid
cid:cid
});
if(res.code==0){
console.log('有语音','--------',res);
if(res.data.length!=0){
let KJres = res.data.filter(item =>{ //快捷支付
return item.type==3
return item.type==3 || item.type==0
})
let PSres = res.data.filter(item => { //订单
return item.type==4 || item.type==5 || item.type==6
return item.type==4 || item.type==5 || item.type==6 || item.type==1
})
if(platform=='ios'){
......@@ -140,17 +178,21 @@
}else{
if(PSres.length!=0){
let msgtext = `你有${PSres.length}条鹿马订单,请及时处理`;
console.log('商城语音播报')
if(this.$store.state.isvoice){
this.$store.dispatch('AudioVoice',msgtext).then((e) => {
uni.vibrateLong();//震动 调用//400ms//长震动
})
}
}
if(KJres.length!=0){
let payText =""
KJres.map(item=>{
payText = payText+","+ item.contents
});
console.log('快捷支付播报')
if(this.$store.state.isvoice){
this.$store.dispatch('AudioVoice',payText).then((e) => {
uni.vibrateLong();//震动 调用//400ms//长震动
......@@ -161,7 +203,6 @@
}
}
if(type!=2){
return true;
}
......@@ -182,4 +223,4 @@
@import './common/qiun.css';
@import './style.css';//我的
</style>
</style>
\ No newline at end of file
......@@ -101,8 +101,10 @@
//提示弹窗
change(e) {
console.log('是否打开:' + e.show)
if (!e.show) {
console.log('是否打开:' + e.show)
console.log(this.$store.state.Timer,'退出登陆取消')
if (!e.show) {
console.log(this.$store.state.Timer,'退出登陆')
this.showtip = false
}
},
......@@ -110,7 +112,8 @@
this.showtip = false;
this.$emit("cancel",{});//触发回调方法
},
show(){
show(){
this.showtip = true;
},
//确认发布点击
......
......@@ -3,9 +3,14 @@
//"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "商家",
"versionName" : "1.0.89",
"versionCode" : 189,
"versionName" : "1.0.93",
"versionCode" : 193,
"transformPx" : false,
"compatible" : {
"ignoreVersion" : true, //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
"runtimeVersion" : "2.9.7,2.9.8", //兼容的uni-app运行环境版本号,多个版本使用,分割
"compilerVersion" : "2.9.8" //兼容的编译器版本号
},
/* 5+App特有相关weex */
"app-plus" : {
"usingComponents" : true,
......@@ -50,7 +55,12 @@
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/>",
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
"<uses-permission android:name=\"android.permission.REORDER_TASKS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\"/>"
]
},
/* ios打包配置 */
......@@ -155,17 +165,17 @@
},
"compilerVersion" : 2,
"nativePlugins" : {
"HG-Background" : {
"push-live" : {
"__plugin_info__" : {
"name" : "保活 前台运行",
"description" : "用于提高app存活概率或添加前台显示 q群:219508489",
"name" : "安卓保活插件(限制 防杀)新增定时器方案 - [试用版,仅用于自定义调试基座]",
"description" : "如果你的应用希望能够一直在后台运行而不被系统自动杀死的话,可以尝试一下。群485147231",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=2203",
"android_package_name" : "com.app.lumastore",
"url" : "https://ext.dcloud.net.cn/plugin?id=2930",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "2203",
"bought" : 0,
"pid" : "2930",
"parameters" : {}
}
}
......
......@@ -235,6 +235,18 @@
"style" : {
"navigationBarTitleText":"添加外卖产品"
}
},
{
"path" : "pages/addEditEleProduct/editProductStore",
"style" : {
"navigationBarTitleText":"快捷修改库存"
}
},
{
"path" : "pages/addEditEleProduct/editProductPrice",
"style" : {
"navigationBarTitleText":"快捷修改价格"
}
},
{
"path" : "pages/ViewLogistics/ViewLogistics",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -83,7 +83,7 @@
<view class="jiu_max " v-if="shop_type == 'ele'">
<navigator :url="'/pages/eleProduct/eleProduct?edit=0&activity_type='+ activity_type ">
<view class="jiu_min">
<view><image class="img" src="/static/icon/20.png" mode=""></image></view>
<view><image class="img" src="/static/icon/eleproduct.png" mode=""></image></view>
<view>外卖产品</view>
</view>
</navigator>
......@@ -103,7 +103,7 @@
<view class="jiu_max" v-if="shop_type == 'ele'">
<navigator url="/pages/shopCategory/shopCategory?type=1">
<view class="jiu_min">
<view><image class="img" src="/static/icon/6.png" mode=""></image></view>
<view><image class="img" src="/static/icon/eleclass.png" mode=""></image></view>
<view>商品分类</view>
</view>
</navigator>
......@@ -134,7 +134,7 @@
<view class="jiu_max">
<navigator url="/pages/specs/specs?type=2">
<view class="jiu_min">
<view><image class="img" src="/static/icon/22.png" mode=""></image></view>
<view><image class="img" src="/static/icon/eleguige.png" mode=""></image></view>
<view>商品规格</view>
</view>
</navigator>
......@@ -144,7 +144,7 @@
<!-- 外卖订单 -->
<navigator url="/pages/order/order">
<view class="jiu_min">
<view><image class="img" src="/static/icon/8.png" mode=""></image></view>
<view><image class="img" src="/static/icon/eleguanli.png" mode=""></image></view>
<view>订单管理</view>
</view>
</navigator>
......@@ -174,7 +174,7 @@
<view class="jiu_max ">
<navigator url="/pages/kehu/kehu">
<view class="jiu_min">
<view><image class="img" src="/static/icon/people.png" mode=""></image></view>
<view><image class="img" src="/static/icon/elesuoke.png" mode=""></image></view>
<view>锁客列表</view>
</view>
</navigator>
......@@ -193,7 +193,7 @@
<view class="jiu_max ">
<navigator url="/pages/CardSend/CardSend">
<view class="jiu_min">
<view><image class="img" src="/static/news/coupon.png" mode=""></image></view>
<view><image class="img" src="/static/news/elecoup.png" mode=""></image></view>
<view>优惠券管理</view>
</view>
</navigator>
......@@ -210,7 +210,7 @@
<view class="jiu_max " @tap="shops">
<view class="jiu_min">
<view><image class="img" src="/static/turntable/turntable.png" mode=""></image></view>
<view><image class="img" src="/static/news/turntable.png" mode=""></image></view>
<view>大转盘</view>
</view>
</view>
......@@ -223,11 +223,11 @@
</view>
</navigator>
</view>
<!-- <view class="jiu_max " >
<!-- hgService.showSafeSetting(); -->
<view class="jiu_max " >
<navigator url="/pages/eleProduct/eleProduct?edit=1">
<view class="jiu_min">
<view><image class="img" src="/static/icon/psfei.png" mode=""></image></view>
<view><image class="img" src="/static/icon/editPrice.png" mode=""></image></view>
<view>快捷改价</view>
</view>
</navigator>
......@@ -236,11 +236,11 @@
<view class="jiu_max " >
<navigator url="/pages/eleProduct/eleProduct?edit=2">
<view class="jiu_min">
<view><image class="img" src="/static/icon/psfei.png" mode=""></image></view>
<view><image class="img" src="/static/icon/editStore.png" mode=""></image></view>
<view>增减库存</view>
</view>
</navigator>
</view> -->
</view>
</view>
<view class="BH"></view>
......@@ -293,8 +293,7 @@
this.$refs.Welcome.show();
}, 2000)
//#ifdef APP-PLUS
if( (plus.device.getVolume() * 1000) < 600 ){ //获取手机音量
uni.showModal({
title: '提示:音量较小',
......@@ -306,16 +305,13 @@
this.$api.msg('设置成功');
},500)
}
}
},
});
}
if(uni.getSystemInfoSync().platform!='ios'){
getApp().hgServiceFun(); //安卓后台运行
console.log('走到后台运行这')
}
getApp().hgServiceFun()
//#endif
},
//下拉刷新
onPullDownRefresh() {
......@@ -323,21 +319,24 @@
// uni.stopPullDownRefresh();//结束下拉刷新
},
onShow() {
this.storeIndexfun();
// 判断用户有没有绑定手机号
console.log(this.$store.state.Timer,'啊啊啊啊啊啊啊啊啊啊啊');
getApp().getnewsRemind().then((res)=>{
if(res){
if(this.$store.state.Timer==''){
let Timer=setInterval(()=>{
getApp().getnewsRemind(2);
console.log('这里');
},5000);
this.$store.commit('Timer',Timer);
}
}
})
this.storeIndexfun();
if(uni.getSystemInfoSync().platform!='ios'){
getApp().getnewsRemind().then((res)=>{
console.log(res)
if(res){
if(this.$store.state.Timer==''){
let Timer=setInterval(()=>{
getApp().getnewsRemind(2);
console.log('这里');
},5000);
this.$store.commit('Timer',Timer);
}
}
})
}
},
methods: {
saoma(e){
......@@ -474,7 +473,7 @@
.jiu_min .img {
width: 64upx;
height: 64upx;
margin-bottom: 20upx;
margin-bottom: 10upx;
}
.mo {
......
......@@ -27,7 +27,7 @@
<view class="goods " v-for="(item,index) of products" :key="index">
<image class="img" :src="staticUrl+item.photo" mode=""></image>
<view class='goods_02'><strong><strong><strong><strong><strong><strong></strong></strong></strong></strong></strong></strong>
<view class='goods_02' style="height: 200upx;">
<view class='goods_title'>{{item.product_name}}</view>
<view class="goods_des">{{item.desc}}</view>
<view class="goods_des">取餐码:{{detail.delivery_num}}</view>
......
......@@ -6,7 +6,13 @@
<navigator url="/pages/edit/shop/shop" class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">门店信息</text>
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
</navigator>
</navigator>
<view class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50" @click="qiDong">
<text class="cell-tit">允许后台自启</text>
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
</view>
<navigator url="/pages/edit/Qualifications/Qualifications" class="list-cell b-b" hover-class="cell-hover" :hover-stay-time="50">
<text class="cell-tit">相关资质</text>
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
......@@ -132,9 +138,14 @@
return debug;
}
},
methods:{
methods:{
qiDong(){
const pushLive = uni.requireNativePlugin('push-live');
pushLive.gotoWhiteListSetting()
},
//联系客服
go(){
go(){
uni.makePhoneCall({
// 手机号
......@@ -213,7 +224,9 @@
this.$api.msg(`跳转到${url}`);
},
//显示弹窗 清除缓存的
toLogoutone(){
toLogoutone(){
// console.log(this.$store.state.Timer,'退出登入')
// this.$store.Timer
this.$refs.moduPopupTwo.show();
},
//退出登录
......@@ -229,7 +242,8 @@
this.$store.commit('changeuserInfo', {});
uni.setStorageSync('userInfo', {});
uni.clearStorage();
clearInterval(this.$store.state.Timer)
this.$store.state.Timer = ''
setTimeout(()=>{
// uni.navigateBack();
uni.navigateTo({
......
static/icon/psfei.png

8.28 KB | W: | H:

static/icon/psfei.png

3.42 KB | W: | H:

static/icon/psfei.png
static/icon/psfei.png
static/icon/psfei.png
static/icon/psfei.png
  • 2-up
  • Swipe
  • Onion skin
static/news/printer.png

1.04 KB | W: | H:

static/news/printer.png

2.82 KB | W: | H:

static/news/printer.png
static/news/printer.png
static/news/printer.png
static/news/printer.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -65,7 +65,7 @@ const store = new Vuex.Store({
isLog: false,
expiresTime: 0,
MyMenus: [],
userInfo: uni.getStorageSync('userInfo'),
userInfo: uni.getStorageSync('userInfo'),
//下面的是登录相关的
hasLogin: false,
......
......@@ -45,3 +45,4 @@ export function getskipShop(data){
export function getshopclass(data){
return request.post("/ele/weigh", data, { noAuth: true});
}
......@@ -6,12 +6,8 @@ module.exports = {
isdebug:false,//正式
//isdebug:true,//测试
// isdebug:true,//测试
xqdebug:false,//正式权限
// xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
......
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