九月线上版本1.2.0

This commit is contained in:
xk_guohonglei
2020-09-09 17:07:57 +08:00
parent 856f0c8167
commit 0bcbc4b3e1
12 changed files with 125 additions and 102 deletions

View File

@@ -34,7 +34,7 @@
<view class="cu-form-group">
<view class="title text-black">手机号</view>
<input type="number" v-model="auth.phone" placeholder="请输入手机号" name="input"></input>
<button class='cu-btn bg-main-oil shadow' @tap="sendMsg">验证码</button>
<text :class="frozen?'text-gray':'oil-main-color'" @tap="sendMsg">{{tips}}</text>
</view>
<view class="cu-form-group">
<view class="title text-black">验证码</view>
@@ -71,6 +71,8 @@
mainURL: this.global.mainURL,
oilSiteNo: '',
oilSite: {},
tips: '发送验证码',
frozen: false, // 二维码冷却时间
auth: {
}
@@ -90,30 +92,53 @@
},
methods: {
sendMsg() {
uni.login({
provider: 'weixin',
success: loginRes => {
const code = loginRes.code
console.log(code)
const data2 = {
code: code,
name: this.auth.userName,
phone: this.auth.phone,
oilSiteCode: this.oilSiteNo
}
loginApi.registerWeixinSMS(data2).then(res => {
console.log('res', res)
uni.showToast({
title: res.msg,
icon: 'none'
})
if (!this.frozen) {
if (this.auth.phone) {
uni.login({
provider: 'weixin',
success: loginRes => {
const code = loginRes.code
console.log(code)
const data2 = {
code: code,
name: this.auth.userName,
phone: this.auth.phone,
oilSiteCode: this.oilSiteNo
}
loginApi.registerWeixinSMS(data2).then(res => {
console.log('res', res)
uni.showToast({
title: res.msg,
icon: 'none'
})
if (res.code === 20000) {
this.frozen = true
setTimeout(() => {
this.frozen = false
clearInterval(timer)
this.tips = `发送验证码`
}, 1000 * 60);
let second = 60
const timer = setInterval(() => {
second--
if (second) {
this.tips = `${second}秒后重发`
} else {
this.tips = `发送验证码`
}
}, 1000)
}
})
},
fail: err => {
console.log(err)
}
})
},
fail: err => {
console.log(err)
}
});
}
},
register() {
uni.login({

View File

@@ -7,7 +7,7 @@
<view class="padding-xs flex align-center">
<view class="flex-sub text-center padding-top-lg">
<view class="txet-xxs">
<text class="text-white">今日收款()</text>
<text class="text-white">今日收款</text>
</view>
<view class=" text-sl padding padding-top-xs"><text class="text-white">{{userAccount.totalMoney|numberFilter}}</text></view>
</view>
@@ -29,7 +29,7 @@
</button> -->
</view>
<view class="padding text-center flex-sub">
<text>账户余额</text>
<text>账户余额</text>
<view class="padding-sm">
<text class="oil-main-color">{{userAccount.totalMoney|numberFilter}}</text>

View File

@@ -22,7 +22,7 @@
</view>
<view class="cu-form-group padding-top-sm" v-else>
<view class="title text-black">密码</view>
<input inpitype="password" v-model="auth.password" placeholder="请输入登入密码" name="input" />
<input type="password" v-model="auth.password" placeholder="请输入登入密码" name="input" />
</view>
</view>
@@ -191,13 +191,16 @@
icon: 'none'
})
if (res.code === 20000) {
this.frozen = true
setTimeout(() => {
this.frozen = true
this.frozen = false
clearInterval(timer)
this.tips = `发送验证码`
}, 1000 * 60);
let second = 60
const timer = setInterval(() => {
second--
if (second) {
this.tips = `${second}秒后重发`
} else {
@@ -205,10 +208,12 @@
this.disabled = false
this.btnColor = '#FE0505'
}
second--
}, 1000)
}
})
} else {
uni.showToast({
title: '请输入您的账号',
@@ -217,6 +222,7 @@
}
}
},
loginRandom() {
uni.login({
provider: 'weixin',

View File

@@ -24,7 +24,7 @@
<area-time :chartData="detailData" />
</view>
</view>
<view class="cu-modal bottom-modal" :class="dialogModal">
<view class="cu-modal bottom-modal" style="z-index: 999999;" :class="dialogModal">
<view class="cu-dialog">
<view class="cu-bar bg-white ">
<view class="action text-blue" @tap="hideModal">取消</view>
@@ -66,7 +66,7 @@
const months = []
const month = date.getMonth() + 1
const days = []
const day = date.getDate() - 1
const day = date.getDate()
for (let i = 2020; i <= date.getFullYear(); i++) {
years.push(i)
}

View File

@@ -19,11 +19,11 @@
<analysis-card @showModal="showModal" :basicData="basicData" />
<view class="margin bg-white radius">
<view class="margin">
<view class="margin" style="position: relative;z-index: 1;">
<area-month :chartData="detailData" />
</view>
</view>
<view class="cu-modal bottom-modal" :class="dialogModal">
<view class="cu-modal bottom-modal" style="z-index: 999999;" :class="dialogModal">
<view class="cu-dialog">
<view class="cu-bar bg-white ">
<view class="action text-blue" @tap="hideModal">取消</view>
@@ -37,16 +37,8 @@
<picker-view-column>
<view class="item" v-for="(item,index) in months" :key="index">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in days" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="onConfirm">确定</button>
</view>
</view>
</view>
</view>
@@ -91,7 +83,7 @@
day: day,
// value: [9999, month - 1, day - 1],
value: [0, month - 1, day - 1],
selDate: year + '-' + month + '-' + day,
selDate: year + '-' + month,
detailData: [],
basicData: {
totalAccount: 0,
@@ -117,15 +109,15 @@
},
methods: {
getMonthly() {
cloudSiteApi.getAnyMonth(this.selDate).then(res => {
cloudSiteApi.getAnyMonth(this.selDate+'-5').then(res => {
uni.stopPullDownRefresh()
if (res.code === 20000) {
this.basicData = res.data.basicData
res.data.detailData.forEach(item=>{
res.data.detailData.forEach(item => {
var date = item[0]
date = date.substring(0, 19);
date = date.replace(/-/g, '/');
item[0] = new Date(date).getTime();
item[0] = new Date(date).getTime();
})
this.detailData = res.data.detailData
}
@@ -144,12 +136,7 @@
} else {
m = this.month
}
if (this.day < 10) {
d = '0' + this.day
} else {
d = this.day
}
this.selDate = this.year + '-' + m + '-' + d
this.selDate = this.year + '-' + m
console.log(this.selDate)
},
showModal(e) {

View File

@@ -33,7 +33,7 @@
<view class="padding text-center flex-sub">
<text>顾客数</text>
<view class="padding-sm">
<text class="oil-main-color">{{basicData.totalAccount|numberFilter}}</text>
<text class="oil-main-color">{{basicData.totalAccount}}</text>
</view>
<!-- <button class="cu-btn bg-main-oil text-white text-sm ">
查看明细
@@ -44,7 +44,7 @@
<view class="margin">
<view class="cu-list menu-avatar radius">
<view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/daily')">
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'">
<view class="cu-avatar lg" :style="'background-image: url('+mainURL+'rb.png)'">
</view>
<view class="content ">
<text>经营分析日报</text>
@@ -57,7 +57,7 @@
</view>
<view class="cu-item" @tap="routerTo('/pages/operation-analysis/analysis/monthly')">
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'">
<view class="cu-avatar lg" :style="'background-image: url('+mainURL+'yb.png)'">
</view>
<view class="content">
<text> 经营分析月报</text>