Commit a80bf90a authored by haitao's avatar haitao

fd

parent dd9bd9d8
{
"rootPathIndex": 1,
"webRoot": "${projectDir}"
}
......@@ -9,39 +9,8 @@
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
setTimeout(()=>{
plus.navigator.closeSplashscreen();
},100)
// plus.push.addEventListener('click',message=>{
// // console.log('message',message)
// })
// plus.push.addEventListener('receive',message=>{
// console.log('message',message)
// if(true){
// }
// })
//获取设备id ios
plus.device.getInfo({
success:(e)=>{
console.log('getDeviceInfo success: '+JSON.stringify(e));
},
fail:(e)=>{
console.log('getDeviceInfo failed: '+JSON.stringify(e));
}
});
const clientInfo = plus.push.getClientInfo();
console.log(clientInfo);
uni.getNetworkType({ //查看是否有网络
success: function (res) {
if(res.networkType=='none'){
......@@ -63,8 +32,6 @@
setTimeout(()=>{
......@@ -82,17 +49,11 @@
methods:{
//获取 语音消息
async getnewsRemind(){
var date = new Date();
let hours = date.getHours();//当前 时间 小时
let datestime = 1000*5;//默认15秒
if(this.$store.state.token!=""){//判断是否 已登录
let res = await newsRemind({
})
// console.log(res,'我登陆了')
let res = await newsRemind({})
if(res.code==0){
if(res.data.length!=0){
//进来了就是有消息
......@@ -155,9 +116,6 @@
})
}
}
// Thread.sleep(1000)
setTimeout(()=>{
if(KJres.length != 0){
let payText =""
......@@ -190,45 +148,12 @@
}
},1000*5)
// let msgtext = `你有${res.length}条新餐饮快捷支付到账,请及时处理`;
//多条的时候
// let msgtext = `你有${msglist.length}条新的鹿马订单了,请及时处理`;
// if(this.$store.state.isvoice){
// this.$store.dispatch('AudioVoice',msgtext).then((e) => {
// console.info(e,"循环消息列表2");
// //震动 调用//400ms//长震动
// uni.vibrateLong({
// success:(re)=> {
// },
// fail:(a)=> {
// }
// })
// })
// }else{
// //震动 调用//400ms//长震动
// uni.vibrateLong({
// success:(re)=> {
// },
// fail:(a)=> {
// }
// })
// }
}
console.info("循环消息列表3");
//回调
setTimeout(()=>{
this.getnewsRemind()
},datestime)
}else{
//获取到的消息列表为空列表
//回调
......@@ -236,9 +161,6 @@
this.getnewsRemind()
},datestime)
}
}else{
//回调
setTimeout(()=>{
......@@ -251,8 +173,6 @@
this.getnewsRemind()
},datestime)
}
},
}
}
......
......@@ -39,6 +39,11 @@
targetImageIndex: null
}
},
watch:{
value(){
console.log(this.value,'帆帆帆帆')
}
},
computed:{
staticUrl(){
return this.$store.state.staticUrl;
......@@ -75,6 +80,7 @@
}
}
},
methods:{
sub(){
this.$emit('sub')
......
......@@ -146,9 +146,8 @@
"portrait7" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png",
"landscape7" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png",
"portrait-1194h@2x" : "C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
}
}
}
}
}
},
"compilerVersion" : 2
......
......@@ -122,10 +122,6 @@
},
//可能少的
//address: "",//详细地址
cate_id: 0, //分了id
......@@ -284,6 +280,7 @@
chooseLocation() {
uni.chooseLocation({
success: (data) => {
console.log(data,'fdfs')
qqmapsdk.reverseGeocoder({
location: {
latitude: data.latitude,
......@@ -293,13 +290,15 @@
this.fromdata.lat = res.result.location.lat;
this.fromdata.lng = res.result.location.lng;
this.fromdata.addr = res.result.address+res.result.formatted_addresses.rough;
this.addNewStoreFun(); //修改信息
},
fail: (err)=>{
console.log(err)
}
})
},
fail: (err)=>{
console.log(err)
}
});
},
......
......@@ -8,7 +8,7 @@
<view class="jiu">
<view class="jiu_01">
<view @tap="saoma">
<view><image class="img" src="/static/icon/1.png" mode=""></image></view>
<image class="img" src="/static/icon/1.png" mode=""></image>
<view>扫码入库</view>
</view>
</view>
......@@ -221,23 +221,8 @@
</view>
</navigator>
</view>
<view class="jiu_max " >
<navigator url="/pages/deliveryCost/deliveryCost">
<view class="jiu_min">
<view><image class="img" src="/static/icon/1.png" mode=""></image></view>
<view>扫一扫</view>
</view>
</navigator>
</view>
</view>
<view class="BH"></view>
<!-- <yomol-upgrade ref="yomolUpgrade"></yomol-upgrade> -->
<!-- 升级组件 -->
<Welcome ref="Welcome"></Welcome>
<!-- 欢迎回来 -->
</view>
......@@ -248,10 +233,7 @@
import uniIcon from "@/components/uni/uni-icon/uni-icon.vue"
import yomolUpgrade from '@/components/yomol-upgrade/yomol-upgrade.vue'; //升级组件
import Welcome from "@/components/Welcome/Welcome.vue"; //欢迎回来
import {
storeIndex
} from "@/utils/api/api.js";
import {storeIndex} from "@/utils/api/api.js";
export default {
data() {
return {
......@@ -276,10 +258,6 @@
storeinfo() {
return this.$store.state.userInfo;
}
},
onLaunch() {
},
onLoad() {
//显示欢迎回来~
......@@ -299,24 +277,16 @@
//检测更新
setTimeout(() => {
// this.$refs.yomolUpgrade.checkVersionClick()
// this.$refs.yomolUpgrade.checkVersionClick();
// #ifdef APP-PLUS
//this.checkVersionClick();//自动检测更新
this.$refs.yomolUpgrade.checkVersionClick();
// #endif
}, 1000)
},
methods: {
saoma(e){
uni.scanCode({
success:res => {
uni.request({
//app_id:qkkbptetyohxoiod app_secret:Wkp2a3NiNjAzTFJLRmwrZXN3QW1jZz09
url: 'https://www.mxnzp.com/api/barcode/goods/details', //仅为示例,并非真实接口地址。
data: {
barcode: res.result,
......@@ -326,66 +296,53 @@
},
method:'GET',
success: (results) => {
let messageArr = []
console.log(results);
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct'
})
}
if(results.data.code==0){
this.$api.msg(results.data.msg);
}else if(results.data.code==1){
results.isScanCode=false;
results.code=res.result;
uni.navigateTo({
url: '/pages/addEditEleProduct/addEditEleProduct?results='+JSON.stringify(results)
})
console.log(results)
}
}
})
}
});
},
jump(){
uni.navigateTo({
url:'/pages/edit/pro_manage/pro_manage?money_type='+this.money_type + '&'+'activity_type='+this.activity_type
})
},
shops(){
if(this.is_luck_draw==1){
uni.navigateTo({
url:"/pages/details/details?shop_id="+this.shop_id
})
}else{
uni.showModal({
title: '温馨提示',
content: '不符合参与条件!请联系客服开通权限400-807-3023',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
jump(){
uni.navigateTo({
url:'/pages/edit/pro_manage/pro_manage?money_type='+this.money_type + '&'+'activity_type='+this.activity_type
})
},
shops(){
if(this.is_luck_draw==1){
uni.navigateTo({
url:"/pages/details/details?shop_id="+this.shop_id
})
}else{
uni.showModal({
title: '温馨提示',
content: '不符合参与条件!请联系客服开通权限400-807-3023',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
demoaudio() {
//语音提醒
//AudioVoice openVoice
// setInterval(()=>{
// this.$store.dispatch('AudioVoice',"您有新的资金变化,请注意查看").then((e) => {
// console.log(e);
// })
// },10000);
this.$store.dispatch('AudioVoice', "您有新的订单,请注意查看").then((e) => {
console.log(e);
//震动 调用
//400ms
//长震动
uni.vibrateLong({
success: (re) => {
......@@ -395,9 +352,7 @@
}
})
// 短震动
//15ms
// uni.vibrateShort()({
// success:(re)=> {
......@@ -408,28 +363,18 @@
// })
})
},
//弹窗
tan() {
this.tancl = !this.tancl
},
//获取首页的数据
async storeIndexfun() {
let res = await storeIndex({
});
// console.log(res);
// console.log(res.data.shop_info.activity_type)
let res = await storeIndex({});
uni.stopPullDownRefresh(); //结束下拉刷新
// console.log(res.data.shop_info.shop_id)
if (res.code == 0) {
this.countdata = res.data.counts; //统计的数据
this.shop_type = res.data.shop_type; //店铺类型 商城 goods
this.shop_id = res.data.shop_info.shop_id;
this.is_luck_draw=res.data.shop_info.is_luck_draw
this.money_type=res.data.shop_info.money_type
this.activity_type = res.data.shop_info.activity_type //判断是否有秒杀资格
......
......@@ -8,7 +8,11 @@ import request from "./../request.js";
*
*/
//查询商品是否入库
export function findEleProduct(data)
{
return request.post("ele/findEleProduct",data,{ noAuth : true});
}
//登录接口
export function userLogin(data)
{
......
......@@ -4,8 +4,8 @@ module.exports = {
//是否为开发调试环境 true为本地环境 false 为正式环境
// isdebug:false,//正式
isdebug:true,//测试
isdebug:false,//正式
//isdebug:true,//测试
......
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