Commit fa1643be authored by haitao's avatar haitao

fd

parents c91ed5f1 97936343
{
"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 = '小马将为你进行实时播报语音';
......@@ -51,20 +50,24 @@
},
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,'十三分东方时代')
});
}
hgService.startService(); //启动前台服务
})
},
async getIosLocation(type){
let that=this;
......@@ -196,6 +199,7 @@
}
}
if(KJres.length!=0){
let payText =""
......
#鹿马商家助手思维导图
##商家管理
###商家资料修改
###商家资质提交
#==========》页面 = 商家资料修改页面 + 商家资质提交页面
#(对应有个门店编辑的页面) 门店编辑有 可以直接对数据
###### 相关资质 /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.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 +123,9 @@
},
"splashscreen" : {
"android" : {
"hdpi" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png",
"xhdpi" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.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 +157,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,11 +620,10 @@
async findEleProduct(results){
console.log('查找商品')
uni.showLoading({title:'请稍后'});
let res=await findEleProduct({code:results.code});
uni.hideLoading();
if(res.code==-1){ //没有就录入
console.log('进入sss');
this.isadd=0;
this.form.manufacturer = results.data.data.supplier
this.form.brand = results.data.data.brand
......@@ -637,39 +636,41 @@
this.codeDisabled=false;//条形码输入框是否禁止输入
}else if(res.code==0){ //有就把信息展示
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)
this.qualityMonths = parseInt((res.data.quality_guarantee_period%365)/30)
this.qualityDays = parseInt((res.data.quality_guarantee_period%365)%30)
this.form.manufacture_date = res.data.manufacture_date
this.form.manufacturer = res.data.manufacturer
this.form.brand = res.data.brand
this.form.sell_type = res.data.sell_type,
this.form.sell_type = res.data.sell_type
this.form.stock=res.data.stock //商品库存
this.form.cost_price=res.data.cost_price //进货价钱
this.form.code=res.data.code //条形编码
this.form.commission=res.data.commission //返佣比例
this.form.commodity_data= typeof(res.data.commodity_data) == 'string'?JSON.parse(res.data.commodity_data):res.data.commodity_data //原始商品名
this.form.product_id=res.data.product_id//修改的时候的产品id
this.form.product_name=res.data.product_name//产品名称
this.form.desc=res.data.desc//产品描述
this.form.cate_id=res.data.cate_id//产品分类id
this.form.lunch_box_fee=res.data.lunch_box_fee//餐盒费
this.form.is_new=res.data.is_new//是否新产品
this.form.is_hot=res.data.is_hot//是否热卖产品
this.form.stock=res.data.stock, //商品库存
this.form.cost_price=res.data.cost_price, //进货价钱
this.form.code=res.data.code ,//条形编码
this.form.commission=res.data.commission, //返佣比例
this.form.commodity_data=res.data.commodity_data, //原始商品名
this.form.product_id=res.data.product_id,//修改的时候的产品id
this.form.product_name=res.data.product_name,//产品名称
this.form.desc=res.data.desc,//产品描述
this.form.cate_id=res.data.cate_id,//产品分类id
this.form.lunch_box_fee=res.data.lunch_box_fee,//餐盒费
this.form.is_new=res.data.is_new,//是否新产品
this.form.is_hot=res.data.is_hot,//是否热卖产品
this.form.price=res.data.price,//价格
this.form.activity_price=res.data.activity_price,//秒杀价
this.form.store_count=res.data.store_count ,// 秒杀库存
this.form.activity_id=res.data.activity_id,//秒杀activity_id
this.form.activity_list=res.data.activity_list,//秒杀列表
this.form.price=res.data.price//价格
this.form.activity_price=res.data.activity_price//秒杀价
this.form.store_count=res.data.store_count // 秒杀库存
this.form.activity_id=res.data.activity_id//秒杀activity_id
this.form.activity_list=res.data.activity_list//秒杀列表
this.form.limit_num=res.data.limit_num//秒杀限购数量 0 不限制
this.isScanCode=false;
this.codeDisabled=true;//条形码输入框是否禁止输入
this.isScanCode=false
this.codeDisabled=true //条形码输入框是否禁止输入
this.c_pics=[{code:0,data:res.data.photo,msg:"success",time:"1587101904"}];
// console.log(this.form.product_name,12131321314312423142123321);
// console.log(this.chindformList);
for(var i = 0; i < this.chindformList.length; i++) {
......@@ -678,10 +679,9 @@
break;
}
}
}
},
myProps(){
},
saoma(e){
uni.scanCode({
......@@ -697,16 +697,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)=>{
......@@ -797,8 +800,7 @@
this.form.price = res.data.price;//价格
this.form.photo = res.data.photo;//图片
this.form.activity_price = res.data.activity_price //秒杀价
this.form.store_count = res.data.store_count //秒杀库存
this.form.store_count = res.data.store_count //秒杀库存
this.form.activity_id = res.data.activity_id//秒杀时段id
this.form.limit_num = res.data.limit_num
this.form.specifications = res.data.gram
......@@ -976,8 +978,9 @@
can.product_id = this.product_id;
}
//添加修改外卖产品
console.log(can);
addEditEleProduct(can).then((res1)=>{
console.log(res1,'成功了');
// console.log(res1,'成功了');
if(res1.code==0){
this.$api.msg(res1.msg);
setTimeout(()=>{
......
......@@ -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',
......
......@@ -454,7 +454,6 @@
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,8 +470,8 @@
}
})
return;
} else{
console.log('zheli')
uni.request({
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: {
......@@ -484,16 +483,11 @@
method: 'GET',
success: (results) => {
if (results.data.code == 0) {
if(results.data.msg=='暂未收录此商品'){
this.$api.msg(results.data.msg);
}else{
results.isScanCode = false;
results.code = res.result;
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results)
})
}
results.isScanCode = false;
results.code = res.result;
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results=' + JSON.stringify(results)
})
} else if (results.data.code == 1) {
results.isScanCode = false;
results.code = res.result;
......
......@@ -106,7 +106,7 @@
miao: 60,
mobile:'',
code:'',
status:'0',
status:0,
psd:'',
newPass:'',
verifyPass:"",//确认密码
......
......@@ -112,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";
......@@ -133,7 +134,6 @@
},
onLoad() {
this.platform=uni.getSystemInfoSync().platform;
console.log(this.platform)
this.getv();
this.storeEleInfofun();//查询外卖店铺详情信息
},
......@@ -149,13 +149,16 @@
methods:{
qiDong(){
if(this.platform=='ios'){
getApp().getIosLocation(2);
}else{
const pushLive = uni.requireNativePlugin('push-live');
pushLive.gotoWhiteListSetting();
pushLive.gotoWhiteListSetting();// 自启动
}
},
//联系客服
go(){
......@@ -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){//店铺名字
......
......@@ -2,16 +2,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