Commit 3e7bcfa1 authored by home's avatar home

zxf

parents 42143be7 fa1643be
{
"rootPathIndex": 1,
"webRoot": "${projectDir}"
}
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/lumastoreapp.iml" filepath="$PROJECT_DIR$/.idea/lumastoreapp.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="a3e4d1c4-910d-4b8e-ae0a-c3b9bec9b7c3" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/pages/Printer/AddPrinter.scss" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pages/Printer/AddPrinter.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/utils/api/printer.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pages/index/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/index/index.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="HTML File" />
<option value="SCSS File" />
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1dtKpRM8nA1Xb9LfqDTnnonHd79" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="DefaultHtmlFileTemplate" value="HTML File" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../tp5" />
<property name="list.type.of.created.stylesheet" value="SCSS" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a3e4d1c4-910d-4b8e-ae0a-c3b9bec9b7c3" name="Default Changelist" comment="" />
<created>1593239131534</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1593239131534</updated>
<workItem from="1593239132729" duration="1731000" />
<workItem from="1593241788165" duration="5953000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
</component>
<component name="WindowStateProjectService">
<state x="549" y="167" key="FileChooserDialogImpl" timestamp="1593246393877">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1593246393877" />
<state x="467" y="144" width="602" height="536" key="find.popup" timestamp="1593308349337">
<screen x="0" y="0" width="1536" height="824" />
</state>
<state x="467" y="144" width="602" height="536" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1593308349337" />
</component>
</project>
\ No newline at end of file
......@@ -6,7 +6,6 @@
import permision from "@/utils/permission.js";//App平台的授权判断封装js
export default {
onLaunch: function() {
if(platform=='ios'){
bgAudioMannager.title = '您已进入鹿马商家助手...';
bgAudioMannager.singer = '小马将为你进行实时播报语音';
......@@ -43,12 +42,7 @@
}
});
// #endif
this.getIosLocation();
},
computed: {
userInfo(){
return this.$store.state.userInfo;
......@@ -56,76 +50,88 @@
},
methods:{
hgServiceFun(){
const hgService = uni.requireNativePlugin("HG-Background"); //初始化
hgService.config({
title:"鹿马商家助手",
content:"小鹿正在为您进行实时播报...",
mode: 1, //0省电模式 1流氓模式
});
var rsult=hgService.checkIfLimited(); //检测是否限制后台运行
if(rsult.isLimit){ //限制了后台运行
hgService.requestIgnoreLimit(); //申请
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.startPollingTask(5);
}else{
pushLive.requestIgnoreBatteryOptimizations(function(res) { // 申请后台运行(提高保活几率)
console.log(res,'十三分东方时代')
});
}
// console.log('没有限制');
hgService.startService(); //启动前台服务
// hgService.showSafeSetting();//打开安全管理 支持小米,华为,锤子,oppo,vivo,三星,乐视,魅族
//var globalEvent = uni.requireNativePlugin('globalEvent'); //全局事件回调 任务启动时间,会有一定延时 一般一分钟内。
})
},
async getIosLocation(type){
if(platform=='ios'){
let result = permision.judgeIosPermission('location'); //是否授权
if(result){
var cllocationManger = plus.ios.import("CLLocationManager");
var status = cllocationManger.authorizationStatus();
console.log("status:" + status); //4 使用期间 3前后台都执行 0下次询问 2拒绝授权
if (status == 3 || status==0) {
uni.getLocation({
type: 'gcj02',
success:(res)=> {
this.getnewsRemind(type);
},
fail:(err)=>{
console.log(err)
}
});
} else {
uni.showModal({
title:'提示:需要获取后台运行权限',
content:'点击“始终”,打开后台运行权限?',
success:(res)=>{
if(res.confirm){
permision.gotoAppPermissionSetting(); //打开当前设置
let that=this;
let result = permision.judgeIosPermission('location'); //是否授权
if(result){
var cllocationManger = plus.ios.import("CLLocationManager");
var status = cllocationManger.authorizationStatus();
console.log("status:" + status); //4 使用期间 3前后台都执行 0下次询问 2拒绝授权
if (status == 3 || status==0) {
uni.setStorageSync('dwstatus',status);
if (that.$store.state.Timer == '') {
that.$store.commit('Timer',setInterval(()=>{
uni.getLocation({
type: 'gcj02',
success:(res)=> {
that.getnewsRemind(type);
}
}
})
}
plus.ios.deleteObject(cllocationManger);
});
},5000));
}else{
clearInterval(that.$store.state.Timer);
that.$store.commit('Timer','');
that.$store.commit('Timer',setInterval(()=>{
uni.getLocation({
type: 'gcj02',
success:(res)=> {
that.getnewsRemind(type);
}
});
},5000));
}
}else{
} else {
uni.showModal({
title:'提示:需要获取您的位置信息',
content:'是否进入设置打开位置权限?',
title:'提示:需要获取后台运行权限',
content:'点击“始终”,打开后台运行权限?',
success:(res)=>{
if(res.confirm){
permision.gotoAppPermissionSetting(); //打开当前设置
}
}
})
}
}else{
this.getnewsRemind(type);
}
plus.ios.deleteObject(cllocationManger);
}else{
uni.showModal({
title:'提示:需要获取您的位置信息',
content:'是否进入设置打开位置权限?',
success:(res)=>{
if(res.confirm){
permision.gotoAppPermissionSetting(); //打开当前设置
}
}
})
}
},
//获取 语音消息
async getnewsRemind(type){
console.log('语音消息')
var date = new Date();
let hours = date.getHours();//当前 时间 小时
let datestime = 5000;//默认15秒
if(this.$store.state.token!=""){//判断是否 已登录
//#ifdef APP-PLUS
......@@ -136,7 +142,6 @@
cid:cid,
});
if(res.code==0){
console.log('语音','--------',res);
if(res.data.length!=0){
let KJres = res.data.filter(item =>{ //快捷支付
return item.type==3 || item.type==0
......
#鹿马商家助手思维导图
##商家管理
###商家资料修改
###商家资质提交
#==========》页面 = 商家资料修改页面 + 商家资质提交页面
#(对应有个门店编辑的页面) 门店编辑有 可以直接对数据
###### 相关资质 /pages/edit/Qualifications/Qualifications
###### 商家信息修改 /pages/edit/shop/shop
##商品管理
###商品分类
###商品添加
###商品编辑
###商品相册功能 略
#===========》 商品分类列表页面 商品分类添加页面 商品编辑管理页面 商品相册列表页
#(商品列表 商品编辑 商品添加 有模板)
##### 商品列表 /pages/edit/pro_manage/pro_manage
##### 商品编辑 /pages/edit/product/product?id=8
##### 商品添加 /pages/edit/product/product?id=8
##### 商品分类列表页 /pages/shopCategory/shopCategory
##### 商品分类添加页面 /pages/shopCategory/shopCategory
##### 商品分编辑页面 /pages/shopCategory/shopCategory
##财务管理
###佣金管理
#### 日报表 月报表 数据可视化 查询功能
###商户资金管理
#### 日流水 月流水 数据可视化 查询功能
#### 图表 [https://ext.dcloud.net.cn/plugin?id=271]
#===========》 佣金管理页面 + 商户资金管理页面
# 图表 在明细 里面
#####佣金管理 /pages/user/mingxi/mingxi
##### 商户资金管理 /pages/user/tongji/tongji
##### 上面两个页面ok 调整下样式就好了
##订单管理
###订单列表
###订单声音提醒 这个是测试过的
###发货功能
### 退单功能
### #===========》 订单列表页面 + 订单发货页面 + 退单页面 + 订单详情页面
##(订单列表 订单详情 是有模板的)
#### 订单订单列表页面 /pages/order/order 现成的 改改就可以了
#### 订单详情页面 /pages/order/detail/detail 现成的 改改就可以了
#### 订单发货页面没做 /pages/order/delivery/delivery?id=1
#### 退单页面 /pages/order/RefundExamine/RefundExamine 外卖退单
#### 退单页面 /pages/order/refundprojuct/refundprojuct 商城退单
##商品规格 ok
###商品规格添加
###商品规格列表
###商品规格编辑
###商品规格删除
#===============》商品规格列表页面(删除功能) + 商品规格添加页面 + 商品规格编辑页面
####商品规格
##商品属性
###商品属性添加
###商品属性列表
###商品属性编辑
###商品属性删除
#==========》商品属性列表页面(删除功能) + 商品属性添加页面 + 商品属性编辑页面
####商品属性 ok
##### 分享功能 参照采源宝
##########
########## 一个商户
########## 多店
########## 多账号
########## 这么处理?
#####3 页面结构
######## pages/login/login 登录 ok
######## pages/yjWithdraw/yjWithdraw 提现
######## pages/setPassword/setPassword 修改密码 ok
######## pages/index/index 首页
######## pages/notice/notice 通知
######## pages/kehu/kehu 锁客列表
######## pages/edit/product/product 添加产品 编辑产品
######## pages/edit/shop/shop 商家信息编辑
######## pages/user/tongji/tongji 商户资金管理 ok
######## pages/user/mingxi/mingxi 佣金明细
######## pages/order/order 订单管理
######## pages/order/shopOrder 商城订单
######## pages/order/detail 订单详情
######## pages/order/delivery/delivery 订单发货
######## pages/order/RefundExamine/RefundExamine 订单退款 外卖的
######## pages/order/refundprojuct/refundprojuct 订单退款 商城的
######## pages/user/fenxiao/success/success 提现成功
######## pages/user/fenxiao/bankcard/bankcard 银行卡管理
######## pages/user/fenxiao/addcard/addcard 添加银行卡
######## pages/edit/pro_manage/pro_manage 产品管理
######## pages/order/detail/detail 订单详情
######## pages/user/reseller/reseller 资金首页
######## pages/user/cash/cash 申请提现
######## pages/user/record/record 资金记录
######## pages/edit/Qualifications/Qualifications 相关资质
######## pages/shopCategory/shopCategory 分类管理
######## pages/specs/specs 商品规格
######## pages/specsadd/specsadd 添加规格
######## pages/setup/setup 设置
######## pages/about/about 关于我们
######## pages/specsShop/specsShop 商品管理规格处理 商品规格
######## pages/storeqrcode/storeqrcode 店铺二维码
######## pages/tagglestore/tagglestore 切换门店
######## pages/shopModel/shopModel 属性 分类管理
######## pages/eleProduct/eleProduct 外卖商品列表
######## pages/addEditEleProduct/addEditEleProduct 添加外卖产品
################################################################################################################ 进度统计
##############
##############
#####3 页面结构
######## pages/storeqrcode/storeqrcode 店铺二维码 ok
######## pages/tagglestore/tagglestore 切换门店 ok
######## pages/about/about 关于我们 ok
######## pages/login/login 登录 ok
######## pages/setPassword/setPassword 修改密码 ok
######## pages/index/index 首页 ok
######## pages/notice/notice 通知 ok
######## pages/kehu/kehu 锁客列表 ok
######## pages/order/order 订单管理 外卖订单列表 ok
######## pages/order/detail 外卖订单详情 订单详情 ok
######## pages/order/detail/detail 订单详情 外卖订单详情 ok
######## pages/user/record/record 资金记录 ok
######## pages/user/tongji/tongji 商户资金管理 ok
######## pages/user/fenxiao/bankcard/bankcard 银行卡管理 ok
######## pages/user/fenxiao/addcard/addcard 添加银行卡 ok
######## pages/user/fenxiao/success/success 提现成功 ok
######## pages/edit/Qualifications/Qualifications 相关资质 ok
######## pages/specs/specs 商品规格 ok
######## pages/specsadd/specsadd 添加规格 ok
######## pages/eleProduct/eleProduct 外卖商品列表 ok
######## pages/addEditEleProduct/addEditEleProduct 添加外卖产品 ok
######## pages/user/mingxi/mingxi 佣金明细 要测试 ok
######## pages/shopCategory/shopCategory 分类管理 添加和列表 ok
######## pages/user/reseller/reseller 资金首页 ok
######## pages/order/delivery/delivery 订单发货 ok
######## pages/setup/setup 设置 ok
######## pages/order/shopOrder 商城订单 ok
######## pages/specsShop/specsShop 商品管理规格处理 商品规格 商品添加关联规格
######## pages/yjWithdraw/yjWithdraw 提现 申请提现 要加风险检测 还没做
######## pages/edit/pro_manage/pro_manage 产品管理 商城产品管理 商城产品列表
######## pages/edit/product/product 添加产品 编辑产品 商城的 还没做 添加商城产品
##商城不做分类
######## pages/order/RefundExamine/RefundExamine 订单退款 外卖的 退款的
######## pages/order/refundprojuct/refundprojuct 订单退款 商城的 没有账号 先不弄 退款的
######## pages/edit/shop/shop 商家信息编辑 先忽略
######## pages/shopModel/shopModel 属性 分类管理 属性和分类的 先不做
\ No newline at end of file
{
"name" : "鹿马商家助手",
//"appid" : "__UNI__FC9419E",
"appid" : "__UNI__1EA80F1", //这个是 web
"description" : "商家",
"versionName" : "1.106",
"versionCode" : 1106,
"versionName" : "1.107",
"versionCode" : 1107,
"transformPx" : false,
"compatible" : {
"ignoreVersion" : true, //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
"runtimeVersion" : "2.9.8,2.9.11,3.0.0,3.0.1", //兼容的uni-app运行环境版本号,多个版本使用,分割
"compilerVersion" : "2.9.8" //兼容的编译器版本号
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
},
/* 5+App特有相关weex */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : false,
"alwaysShowBeforeRender" : true,
"waiting" : false,
"autoclose" : true,
"delay" : 0
......@@ -126,9 +124,9 @@
},
"splashscreen" : {
"android" : {
"hdpi" : "C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png",
"xhdpi" : "C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
"hdpi" : "C:/Users/Administrator/Desktop/上架相关证明/鹿马配送相关证明/qidongimg.png",
"xhdpi" : "C:/Users/Administrator/Desktop/上架相关证明/鹿马配送相关证明/qidongimg.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/上架相关证明/鹿马配送相关证明/qidongimg.png"
},
"ios" : {
"iphone" : {
......@@ -160,22 +158,23 @@
"portrait-1194h@2x" : "C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
}
},
"iosStyle" : "common"
"iosStyle" : "common",
"androidStyle" : "default"
}
},
"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",
"url" : "https://ext.dcloud.net.cn/plugin?id=2930",
"android_package_name" : "com.app.lumastore",
"ios_bundle_id" : "",
"ios_bundle_id" : "com.app.lumastore",
"isCloud" : true,
"bought" : 1,
"pid" : "2203",
"pid" : "2930",
"parameters" : {}
}
}
......
......@@ -620,14 +620,10 @@
async findEleProduct(results){
console.log('查找商品')
uni.showLoading({title:'请稍后'});
let res=await findEleProduct({code:results.code});
uni.hideLoading();
console.log(res);
if(res.code==-1){ //没有就录入
console.log('进入sss');
console.log('进入sss');
this.isadd=0;
this.form.manufacturer = results.data.data.supplier
this.form.brand = results.data.data.brand
......@@ -640,7 +636,7 @@
this.codeDisabled=false;//条形码输入框是否禁止输入
}else if(res.code==0){ //有就把信息展示
console.log('进tsadadadfafasdffsa');
console.log('进tsadadadfafasdffsa');
this.isadd=1;
this.form.quality_guarantee_period = res.data.quality_guarantee_period
this.qualitYears = parseInt(res.data.quality_guarantee_period/365)
......@@ -707,16 +703,19 @@
},
method:'GET',
success: (results) => {
if(results.data.code==0){
this.$api.msg(results.data.msg);
}else if(results.data.code==1){
console.log(results)
if(results.data.code==1){
results.code=code;
results.isScanCode=false;
this.findEleProduct(results);
}else{
results.code=code;
results.isScanCode=false;
this.findEleProduct(results);
}
}
})
},
fail:(err)=>{
......
......@@ -153,11 +153,8 @@
nitial_delivery_fee: this.nitial_delivery_fee,
delivery_distance:this.delivery_distance
})
if (res.code == 0) {
uni.showModal({
title: '提示',
content: res.msg,
})
if (res.code == 0) {
this.$api.msg(res.msg);
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index',
......
......@@ -402,7 +402,6 @@
// uni.stopPullDownRefresh();//结束下拉刷新
},
onShow() {
getskipShop({
type: 'bld'
}).then(res => {
......@@ -413,46 +412,48 @@
}
})
this.storeIndexfun();
console.log('11111')
getApp().getnewsRemind().then((res) => {
if (res) {
if (this.$store.state.Timer == '') {
let Timer = setInterval(() => {
getApp().getIosLocation(2);
}, 5000);
this.$store.commit('Timer', Timer);
}else{
console.log('2222222222222222')
if(uni.getStorageSync('dwstatus')==''){
getApp().getnewsRemind().then(res=>{
if(res){
if (this.$store.state.Timer == '') {
let Timer = setInterval(() => {
getApp().getnewsRemind(2);
}, 5000);
this.$store.commit('Timer', Timer);
}
}
})
}else{
if( uni.getStorageSync('dwstatus')==3 || uni.getStorageSync('dwstatus')==0){
//this.$api.msg('不是第一次')
getApp().getIosLocation(2);
}else {
//this.$api.msg('第一次')
getApp().getnewsRemind().then(res=>{
if(res){
if (this.$store.state.Timer == '') {
let Timer = setInterval(() => {
getApp().getnewsRemind(2);
}, 5000);
this.$store.commit('Timer', Timer);
}
}
})
}
})
}
// getApp().getnewsRemind().then((res) => {
// if (res) {
// if (this.$store.state.Timer == '') {
// let Timer = setInterval(() => {
// getApp().getnewsRemind(2);
// }, 5000);
// this.$store.commit('Timer', Timer);
// }else{
// console.log('2222222222222222')
// }
// }
// })
},
methods: {
saoma(e) {
uni.scanCode({
success: res => {
if (res.scanType == 'QR_CODE') {
if (res.scanType == 'QR_CODE') { //二维码
let param = this.GetRequest(res.result);
param.shop_id = this.shop_id
activity_nucleus(param).then(res => {
if (res.code == 0) {
uni.showModal({
......@@ -471,7 +472,6 @@
return;
} else{
uni.request({
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: {
......@@ -484,7 +484,6 @@
success: (results) => {
console.log(results)
if (results.data.code == 0) {
console.log(results);
results.isScanCode = false;
results.code = res.result;
uni.navigateTo({
......
......@@ -106,7 +106,7 @@
miao: 60,
mobile:'',
code:'',
status:'0',
status:0,
psd:'',
newPass:'',
verifyPass:"",//确认密码
......@@ -139,7 +139,7 @@
this.login();
}
getApp().getIosLocation();//实时获取位置
},
onLoad() {
......
......@@ -8,10 +8,15 @@
<image class="jiantousi" src="/static/news/jiantousi.png" mode=""></image>
</navigator>
<view class="list-cell b-b m-t" hover-class="cell-hover" :hover-stay-time="50" @click="qiDong">
<view class="list-cell b-b m-t" v-if="platform=='android'" 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>
<view class="list-cell b-b m-t" v-if="platform=='ios'" hover-class="cell-hover" :hover-stay-time="50" @click="qiDong">
<text class="cell-tit">ios后台播报权限</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>
......@@ -107,7 +112,8 @@
</view>
</template>
<script>
<script>
import {userLogout,deleteStore,storeOpenEle,storeEleInfo} from "@/utils/api/api.js";
import yomolUpgrade from '@/components/yomol-upgrade/yomol-upgrade.vue';//升级组件
import moduPopup from "@/components/moduPopup/moduPopup.vue";
......@@ -122,10 +128,12 @@
//ischecked:false,//声音提醒开关
version:"1.00",
ischeckedtwo:false,//店铺打烊情况
isshowdy:false,//是否显示打烊按钮
isshowdy:false,//是否显示打烊按钮
platform:'ios',
};
},
onLoad() {
onLoad() {
this.platform=uni.getSystemInfoSync().platform;
this.getv();
this.storeEleInfofun();//查询外卖店铺详情信息
},
......@@ -137,31 +145,26 @@
debug(){
return debug;
}
},
},
methods:{
qiDong(){
const hgService = uni.requireNativePlugin("HG-Background");
hgService.showSafeSetting();
if(this.platform=='ios'){
getApp().getIosLocation(2);
}else{
const pushLive = uni.requireNativePlugin('push-live');
pushLive.gotoWhiteListSetting();// 自启动
}
},
//联系客服
go(){
uni.makePhoneCall({
// 手机号
phoneNumber: '18896603065',
// 成功回调
success: (res) => {
console.log('调用成功!')
},
// 失败回调
fail: (res) => {
console.log('调用失败!')
}
});
phoneNumber: '18896603065',
});
},
//查询外卖店铺详情信息
......@@ -235,7 +238,15 @@
userLogout({
}).then((res)=>{
if(res.code==0){
if(res.code==0){
if(this.platform!='ios'){
const pushLive = uni.requireNativePlugin('push-live');
pushLive.closeService(function(res) {
console.log(res,'停止保活');
});
}
this.$api.msg("退出成功");
uni.setStorageSync('token',"");
this.$store.commit('changetoken',"");
......
......@@ -196,18 +196,34 @@
}).then(res=>{
uni.hideLoading();
if(res.code==0){
this.qrcodeurl= this.staticUrl1+res.data.file;
this.avater();
uni.downloadFile({ //下载二维码
url:this.staticUrl1+res.data.file,
success:res=>{
uni.hideLoading();
if(res.statusCode==200){ //下载成功
this.qrcodeurl=res.tempFilePath;
this.avater(this.qrcodeurl);
}else{
this.qrcodeurl='';
this.avater(this.qrcodeurl);
}
},
fail:err=>{
this.qrcodeurl='';
this.avater(this.qrcodeurl);
this.$api.msg("图片下载失败");
}
})
}else{
this.qrcodeurl= '';
this.$api.msg("生成二维码失败");
this.avater();
this.avater(this.qrcodeurl);
}
})
},
avater(){ //主图下载
console.log(this.statictowUrl+"static/applet5/images/uts/sjrwm.png",)
avater(qrcodeurl){ //主图下载
uni.showLoading({title:'图片下载中...',mask:true});
uni.downloadFile({ //下载图片到本地
url:this.statictowUrl+"static/applet5/images/uts/sjrwm.png",//背景主图片, //主图
......@@ -215,32 +231,32 @@
uni.hideLoading();
if(res.statusCode==200){ //下载成功
this.avaterSrc=res.tempFilePath;
this.drawPosters(this.avaterSrc)
this.drawPosters(qrcodeurl,this.avaterSrc)
}else{
this.avaterSrc='';
this.drawPosters(this.avaterSrc)
this.drawPosters(qrcodeurl,this.avaterSrc)
}
},
fail:err=>{
uni.hideLoading();
this.avaterSrc='';
this.drawPosters(avaterSrc);
this.drawPosters(qrcodeurl,this.avaterSrc);
this.$api.msg("图片下载失败");
}
})
},
drawPosters(avaterSrc){
drawPosters(qrcodeurl,avaterSrc){
let rpx=this.rpx;
uni.showLoading({title:'正在绘制海报...',mask:true});
const ctx = uni.createCanvasContext('myCanvas',this);//创建画布
ctx.setFillStyle('#FFFFFF');
ctx.fillRect(0,0,this.windowWidth,this.bgHeight);
console.log(qrcodeurl,avaterSrc)
if(avaterSrc){//主图
ctx.drawImage(avaterSrc,0,0,this.windowWidth,this.bgHeight);
}
if(this.qrcodeurl){//二维码
ctx.drawImage(this.qrcodeurl, (this.windowWidth-210*rpx)/2, 220, 210*rpx, 220*rpx);
if(qrcodeurl){//二维码
ctx.drawImage(qrcodeurl, (this.windowWidth-210*rpx)/2, 220, 210*rpx, 220*rpx);
}
if(this.shopname){//店铺名字
......
......@@ -76,7 +76,8 @@ const store = new Vuex.Store({
count: 0,
isvoice:true,//是否播放语音提示
Timer:'', //实时获取订单消息的定时器
Timer:'', //实时获取订单消息的定时器
},
mutations: {
Timer(state,type){
......
......@@ -4,16 +4,12 @@ module.exports = {
//是否为开发调试环境 true为本地环境 false 为正式环境
isdebug:false,//正式
// isdebug:true,//测试
isdebug:false,//正式
//isdebug:true,//测试
// xqdebug:false,//正式权限
xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
// #ifdef APP-PLUS
// isdebug:false,//正式 APP里面绝对是正式
// #endif
}
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