更新
This commit is contained in:
parent
cc827a5c09
commit
1a61a73237
@ -1,7 +1,12 @@
|
|||||||
import Cache from '@/utils/cache';
|
import Cache from '@/utils/cache';
|
||||||
const state = {
|
const state = {
|
||||||
eyeType: Cache.get('eyeType') || true,
|
eyeType: Cache.get('eyeType') || true, // 小眼睛
|
||||||
request: Cache.get('request') || true,
|
request: Cache.get('request') || true, // 网络请求
|
||||||
|
timer: [{
|
||||||
|
id: -1,
|
||||||
|
time: 60,
|
||||||
|
timer: null
|
||||||
|
}], //
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -12,11 +17,40 @@ const mutations = {
|
|||||||
SET_REQUEST(state, data=true){
|
SET_REQUEST(state, data=true){
|
||||||
state.request = data;
|
state.request = data;
|
||||||
Cache.set('request', state.request);
|
Cache.set('request', state.request);
|
||||||
|
},
|
||||||
|
clearTimer(state, id){
|
||||||
|
let time = state.timer.find(item=>item.id==id);
|
||||||
|
clearInterval(time.timer);
|
||||||
|
time.timer = null;
|
||||||
|
time.time = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
|
startTimer({state, commit}, data){
|
||||||
|
let time = state.timer.find(item=>item.id==data.id);
|
||||||
|
if(time){
|
||||||
|
time.timer = setInterval(() => {
|
||||||
|
time.time--;
|
||||||
|
if (time.time <= 0) {
|
||||||
|
commit('clearTimer', data.id);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
state.timer.push({
|
||||||
|
id: data.id,
|
||||||
|
time: data.time,
|
||||||
|
timer: null
|
||||||
|
})
|
||||||
|
let new_time = state.timer.find(item=>item.id==data.id);
|
||||||
|
new_time.timer = setInterval(() => {
|
||||||
|
new_time.time--;
|
||||||
|
if (new_time.time <= 0) {
|
||||||
|
commit('clearTimer', data.id);
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import app from "./app";
|
import app from "./app";
|
||||||
import config from "./config"
|
import config from "./config";
|
||||||
export default {
|
export default {
|
||||||
app,
|
app,
|
||||||
config
|
config
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
this.navTo('/subpkg/submit/submit');
|
this.navTo('/subpkg/submit/submit');
|
||||||
}catch(e){
|
}catch(e){
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
Toast('发送失败');
|
Toast(e.msg||'合同发送失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 发送短信
|
// 发送短信
|
||||||
|
@ -38,8 +38,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF"></u-line>
|
<u-line color="#999999FF"></u-line>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="left">已签订</view>
|
<view class="left" v-if="item.status">已签订</view>
|
||||||
<!-- <view class="left red">已到期</view> -->
|
<view class="left yellow" v-else-if="item.check_status>=2">签订中</view>
|
||||||
|
<view class="left red" v-else>未签订</view>
|
||||||
<button class="right" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
|
<button class="right" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -235,6 +236,10 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #34A853;
|
color: #34A853;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.yellow {
|
||||||
|
color: #F9AA32;
|
||||||
|
}
|
||||||
|
|
||||||
.red {
|
.red {
|
||||||
color: #F02828FF;
|
color: #F02828FF;
|
||||||
|
@ -63,7 +63,7 @@ function baseRequestTwo(url, method, data, {
|
|||||||
// uni.hideLoading();
|
// uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.data.msg || '请检查网络',
|
title: res.data.msg || '请检查网络',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
})
|
})
|
||||||
reject(res.data);
|
reject(res.data);
|
||||||
} else if (res.data.code == 1){
|
} else if (res.data.code == 1){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user