update
This commit is contained in:
parent
052710886b
commit
f3ff6b4c44
35
App.vue
35
App.vue
@ -7,12 +7,12 @@
|
|||||||
mapMutations
|
mapMutations
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
computed:{
|
computed:{
|
||||||
...mapGetters({'user':'getUser'})
|
...mapGetters({'user':'getUser'})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
...mapActions(['memberLogin','getLoginCode']),
|
...mapActions(['memberLogin','getLoginCode']),
|
||||||
...mapMutations(['setVisitChannels']),
|
...mapMutations(['setVisitChannels']),
|
||||||
},
|
},
|
||||||
@ -27,26 +27,27 @@
|
|||||||
Vue.prototype.CustomBar = e.statusBarHeight + 45;
|
Vue.prototype.CustomBar = e.statusBarHeight + 45;
|
||||||
};
|
};
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
Vue.prototype.StatusBar = e.statusBarHeight;
|
Vue.prototype.StatusBar = e.statusBarHeight;
|
||||||
let custom = wx.getMenuButtonBoundingClientRect();
|
let custom = wx.getMenuButtonBoundingClientRect();
|
||||||
Vue.prototype.Custom = custom;
|
Vue.prototype.Custom = custom;
|
||||||
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
|
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
|
||||||
Vue.prototype.pageWindowHeight = e.screenHeight-custom.bottom - custom.top + e.statusBarHeight;;
|
Vue.prototype.pageWindowHeight = e.screenHeight-custom.bottom - custom.top + e.statusBarHeight;;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let _this = this
|
let _this = this
|
||||||
|
console.log('app',this.user.WeChat_MiniProToken)
|
||||||
if (this.user.WeChat_MiniProToken) {
|
if (this.user.WeChat_MiniProToken) {
|
||||||
this.memberLogin() // 获取用户数据
|
this.memberLogin() // 获取用户数据
|
||||||
} else {
|
} else {
|
||||||
this.getLoginCode()
|
this.getLoginCode()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setVisitChannels(options.scene)
|
this.setVisitChannels(options.scene)
|
||||||
const updateManager = uni.getUpdateManager()
|
const updateManager = uni.getUpdateManager()
|
||||||
updateManager.onUpdateReady(function(res) {
|
updateManager.onUpdateReady(function(res) {
|
||||||
@ -63,10 +64,10 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
this.$util.addUserBehavior( {intoRoute: '/'+options.path, outtoRoute: ''}) // 记录用户行为
|
this.$util.addUserBehavior( {intoRoute: '/'+options.path, outtoRoute: ''}) // 记录用户行为
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
||||||
// var pages = getCurrentPages() // 获取加载的页面
|
// var pages = getCurrentPages() // 获取加载的页面
|
||||||
// let len = pages.length
|
// let len = pages.length
|
||||||
// if (len > 0) {
|
// if (len > 0) {
|
||||||
@ -78,7 +79,7 @@
|
|||||||
},
|
},
|
||||||
onHide: function(options) {
|
onHide: function(options) {
|
||||||
let pages = getCurrentPages() // 获取加载的页面
|
let pages = getCurrentPages() // 获取加载的页面
|
||||||
|
|
||||||
let len = pages.length
|
let len = pages.length
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
let currentPage = pages[len - 1] // 获取当前页面的对象
|
let currentPage = pages[len - 1] // 获取当前页面的对象
|
||||||
@ -92,7 +93,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import url("./common/uni.css");
|
@import url("./common/uni.css");
|
||||||
|
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
page {
|
page {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@ -157,7 +158,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* #ifdef MP-WEIXIN */
|
/* #ifdef MP-WEIXIN */
|
||||||
/*
|
/*
|
||||||
checkbox .wx-checkbox-input {
|
checkbox .wx-checkbox-input {
|
||||||
border-radius: 20%;
|
border-radius: 20%;
|
||||||
border: 1rpx solid #91A6D7;
|
border: 1rpx solid #91A6D7;
|
||||||
@ -165,7 +166,7 @@
|
|||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
background-color: #91A6D7;
|
background-color: #91A6D7;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
@ -174,7 +175,7 @@
|
|||||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
checkbox .wx-checkbox-input {
|
checkbox .wx-checkbox-input {
|
||||||
border-radius: 50% ;
|
border-radius: 50% ;
|
||||||
background-color: #D8DFEE ;
|
background-color: #D8DFEE ;
|
||||||
@ -182,13 +183,13 @@
|
|||||||
height: 38rpx ;
|
height: 38rpx ;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||||
background-color: #2E6CF6;
|
background-color: #2E6CF6;
|
||||||
border-color: #2E6CF6 ;
|
border-color: #2E6CF6 ;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export default {
|
|||||||
loadMore(){
|
loadMore(){
|
||||||
if(!this.pageData.isEnd) {
|
if(!this.pageData.isEnd) {
|
||||||
this.pageData.pageIndex += 1
|
this.pageData.pageIndex += 1
|
||||||
this.getList()
|
this.getData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
@ -58,10 +58,10 @@ export default {
|
|||||||
QueryType:"0",
|
QueryType:"0",
|
||||||
SearchParameter:{
|
SearchParameter:{
|
||||||
Operation_Type: "10",
|
Operation_Type: "10",
|
||||||
BusinessProcessState: "2000,3000,9000,9999",
|
BusinessProcess_StateSearch: "2000,2010,2020,2030,2040,2050,2060,2070,2080,2090,3000,9000,9999",
|
||||||
},
|
},
|
||||||
ShowWholePower: true,
|
ShowWholePower: true,
|
||||||
PageIndex:1,
|
PageIndex:this.pageData.pageIndex,
|
||||||
PageSize: 10,
|
PageSize: 10,
|
||||||
SortStr:'BUSINESSAPPROVAL_STATE,BUSINESS_STARTDATE desc'
|
SortStr:'BUSINESSAPPROVAL_STATE,BUSINESS_STARTDATE desc'
|
||||||
// SortStr: 'BusinessProcess_State,BusinessProcess_StartDate desc'
|
// SortStr: 'BusinessProcess_State,BusinessProcess_StartDate desc'
|
||||||
@ -94,7 +94,7 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'正在加载'
|
title:'正在加载'
|
||||||
})
|
})
|
||||||
this.getList()
|
this.getData()
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@ -110,7 +110,7 @@ export default {
|
|||||||
})
|
})
|
||||||
_this.pageData.pageIndex = 1
|
_this.pageData.pageIndex = 1
|
||||||
_this.pageData.isEnd = false
|
_this.pageData.isEnd = false
|
||||||
// _this.getList()
|
// _this.getData()
|
||||||
console.log('onShow')
|
console.log('onShow')
|
||||||
_this.getData()
|
_this.getData()
|
||||||
this.shouldReLoadingList(false)
|
this.shouldReLoadingList(false)
|
||||||
@ -124,7 +124,7 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'正在加载'
|
title:'正在加载'
|
||||||
})
|
})
|
||||||
// this.getList()
|
// this.getData()
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
|||||||
@ -12,14 +12,14 @@
|
|||||||
<image src="/static/images/tab_down.png" mode="aspectFit"></image>
|
<image src="/static/images/tab_down.png" mode="aspectFit"></image>
|
||||||
</picker>
|
</picker>
|
||||||
<button type="primary" size="mini" class="search-button" @tap="searchList">查询</button>
|
<button type="primary" size="mini" class="search-button" @tap="searchList">查询</button>
|
||||||
</div>
|
</div>
|
||||||
<view v-if="!pageData.isLoading && pageList.length>0">
|
<view v-if="!pageData.isLoading && pageList.length>0">
|
||||||
<div class="box-card" v-for="(item,i) in pageList" :key="i" @tap="goDetail(item)">
|
<div class="box-card" v-for="(item,i) in pageList" :key="i" @tap="goDetail(item)">
|
||||||
<div class="box-top-title">
|
<div class="box-top-title">
|
||||||
<span class="title-clock">{{$util.cutDate(item.ENDACCOUNT_DATE,'YYYY年MM月DD日')}}</span>
|
<span class="title-clock">{{$util.cutDate(item.ENDACCOUNT_DATE,'YYYY年MM月DD日')}}</span>
|
||||||
<span class="title-fn">{{item.SERVERPART_NAME}}</span>
|
<span class="title-fn">{{item.SERVERPART_NAME}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box-bottom-tab">
|
<div class="box-bottom-tab">
|
||||||
<div class="tab-unit">
|
<div class="tab-unit">
|
||||||
<i class="tab-icon1"></i>
|
<i class="tab-icon1"></i>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="pageData.isLoading===false" >
|
<view v-else-if="pageData.isLoading===false" >
|
||||||
<noFound :nodata="pageList.length>0 ? false : true"/>
|
<noFound :nodata="pageList.length>0 ? false : true"/>
|
||||||
@ -45,11 +45,11 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
let now = new Date()
|
let now = new Date()
|
||||||
|
|
||||||
let nowTime = this.$util.cutDate(now, 'YYYY/MM/DD')
|
let nowTime = this.$util.cutDate(now, 'YYYY/MM/DD')
|
||||||
let sTime = this.$util.cutDate(now, 'YYYY/MM/DD', -2)
|
let sTime = this.$util.cutDate(now, 'YYYY/MM/DD', -2)
|
||||||
return {
|
return {
|
||||||
|
|
||||||
pageData: {
|
pageData: {
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 99,
|
pageSize: 99,
|
||||||
@ -70,7 +70,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['shouldReLoadingList']),
|
...mapMutations(['shouldReLoadingList']),
|
||||||
bindDateChange(e,index){
|
bindDateChange(e,index){
|
||||||
|
|
||||||
this.pageData.searchTime[index] = e.detail.value
|
this.pageData.searchTime[index] = e.detail.value
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
@ -85,33 +85,33 @@
|
|||||||
},
|
},
|
||||||
getList () {
|
getList () {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
console.log('this')
|
||||||
_this.$request.$get('GetEndaccountTotalList',{
|
_this.$request.$get('GetEndaccountTotalList',{
|
||||||
// action_record: this.searchTime,
|
// action_record: this.searchTime,
|
||||||
Page_Index: this.pageData.pageIndex,
|
Page_Index: this.pageData.pageIndex,
|
||||||
Page_Size: this.pageData.pageSize,
|
Page_Size: this.pageData.pageSize,
|
||||||
Statistical_Date: `${this.pageData.searchTime[0]},${this.pageData.searchTime[1]}`, // '2019/12/27'
|
Statistical_Date: `${this.pageData.searchTime[0]},${this.pageData.searchTime[1]}`, // '2019/12/27'
|
||||||
|
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
_this.pageData.isLoading = false
|
_this.pageData.isLoading = false
|
||||||
if(!res.Result_Code ||res.Result_Code!='100') return
|
if(!res.Result_Code ||res.Result_Code!='100') return
|
||||||
|
|
||||||
let list = res.Result_Data.List
|
let list = res.Result_Data.List
|
||||||
|
|
||||||
_this.pageList = _this.pageData.pageIndex ==1 ? list :[..._this.pageList,...list]
|
_this.pageList = _this.pageData.pageIndex ==1 ? list :[..._this.pageList,...list]
|
||||||
// _this.showList = list.slice(0,_this.pageData.pageSize)
|
// _this.showList = list.slice(0,_this.pageData.pageSize)
|
||||||
|
|
||||||
if (list.length < _this.pageData.pageSize) {
|
if (list.length < _this.pageData.pageSize) {
|
||||||
_this.pageData.isEnd = true
|
_this.pageData.isEnd = true
|
||||||
}
|
}
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goDetail(item){
|
goDetail(item){
|
||||||
this.$util.toNextRoute('navigateTo', '/pages/dataSummary/dayDetail?seviceId='+item.SERVERPART_ID+'&date='+item.ENDACCOUNT_DATE)
|
this.$util.toNextRoute('navigateTo', '/pages/dataSummary/dayDetail?seviceId='+item.SERVERPART_ID+'&date='+item.ENDACCOUNT_DATE)
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@ -132,7 +132,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReachBottom(){
|
onReachBottom(){
|
||||||
|
|
||||||
if(!this.pageData.isEnd) {
|
if(!this.pageData.isEnd) {
|
||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title:'正在加载'
|
// title:'正在加载'
|
||||||
@ -141,10 +141,10 @@
|
|||||||
// let showList = this.showList
|
// let showList = this.showList
|
||||||
// let pageList = this.pageList
|
// let pageList = this.pageList
|
||||||
// let maxLen = pageList.length
|
// let maxLen = pageList.length
|
||||||
|
|
||||||
// let startArrIndex = pageIndex*pageSize - 1
|
// let startArrIndex = pageIndex*pageSize - 1
|
||||||
// let endArrIndex = startArrIndex+pageSize
|
// let endArrIndex = startArrIndex+pageSize
|
||||||
|
|
||||||
// if(endArrIndex < maxLen) {
|
// if(endArrIndex < maxLen) {
|
||||||
// this.showList = showList.concat(pageList.slice(startArrIndex,endArrIndex))
|
// this.showList = showList.concat(pageList.slice(startArrIndex,endArrIndex))
|
||||||
// } else{
|
// } else{
|
||||||
@ -170,13 +170,13 @@
|
|||||||
_this.getList()
|
_this.getList()
|
||||||
_this.shouldReLoadingList(false)
|
_this.shouldReLoadingList(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.$util.addUserBehavior()
|
this.$util.addUserBehavior()
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -218,7 +218,7 @@
|
|||||||
}
|
}
|
||||||
/* 内容卡片 */
|
/* 内容卡片 */
|
||||||
.box-card {
|
.box-card {
|
||||||
|
|
||||||
margin: 30upx 24upx;
|
margin: 30upx 24upx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0px 0upx 8upx 0.4upx #e2e2e2;
|
box-shadow: 0px 0upx 8upx 0.4upx #e2e2e2;
|
||||||
@ -242,7 +242,7 @@
|
|||||||
color: #636363;
|
color: #636363;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.title-fn:before {
|
.title-fn:before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
@ -251,9 +251,9 @@
|
|||||||
height: 20upx;
|
height: 20upx;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-clock:before {
|
.title-clock:before {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -271,7 +271,7 @@
|
|||||||
.box-bottom-tab{
|
.box-bottom-tab{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
padding: 24upx 24upx;
|
padding: 24upx 24upx;
|
||||||
}
|
}
|
||||||
.tab-unit {
|
.tab-unit {
|
||||||
@ -299,7 +299,7 @@
|
|||||||
height: 32upx;
|
height: 32upx;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
|
|
||||||
}
|
}
|
||||||
.tab-icon1:before {
|
.tab-icon1:before {
|
||||||
background-image: url(../../static/images/mbwa/rw.png);
|
background-image: url(../../static/images/mbwa/rw.png);
|
||||||
|
|||||||
@ -452,6 +452,7 @@
|
|||||||
},
|
},
|
||||||
async initData() { // 初始化营收数据
|
async initData() { // 初始化营收数据
|
||||||
let _this = this
|
let _this = this
|
||||||
|
console.log('theRequest',this.theRequest)
|
||||||
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
|
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
|
||||||
await anhuiYestodayRevenueData.getData(this.theRequest) // 获取实时数据
|
await anhuiYestodayRevenueData.getData(this.theRequest) // 获取实时数据
|
||||||
|
|
||||||
|
|||||||
@ -16,10 +16,10 @@ const state = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
|
|
||||||
getUser(state) {
|
getUser(state) {
|
||||||
return state.userData
|
return state.userData
|
||||||
},
|
},
|
||||||
getMenu(state) {
|
getMenu(state) {
|
||||||
return state.userData.AuthorityInfo
|
return state.userData.AuthorityInfo
|
||||||
},
|
},
|
||||||
@ -35,7 +35,7 @@ const getters = {
|
|||||||
shouldReLoadingList (state) {
|
shouldReLoadingList (state) {
|
||||||
return state.shouldReLoadingList
|
return state.shouldReLoadingList
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -46,12 +46,12 @@ const mutations = {
|
|||||||
setVisitChannels (state, data) {
|
setVisitChannels (state, data) {
|
||||||
state.visitChannels = data
|
state.visitChannels = data
|
||||||
},
|
},
|
||||||
|
|
||||||
shouldReLoadingList (state, data){
|
shouldReLoadingList (state, data){
|
||||||
state.shouldReLoadingList = data
|
state.shouldReLoadingList = data
|
||||||
},
|
},
|
||||||
isConnect(state,value) {
|
isConnect(state,value) {
|
||||||
|
|
||||||
state.isConnect = value
|
state.isConnect = value
|
||||||
},
|
},
|
||||||
setUserTodoList(state,value){
|
setUserTodoList(state,value){
|
||||||
@ -67,24 +67,26 @@ const actions = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTodoList({ dispatch, state,commit}){ // 获取用户待办事项
|
getTodoList({ dispatch, state,commit}){ // 获取用户待办事项
|
||||||
let _user = state.userData
|
let _user = state.userData
|
||||||
request.$get("ToDoList", {
|
request.$get("ToDoList", {
|
||||||
userId: _user.UserId,
|
userId: _user.UserId,
|
||||||
userName: _user.UserName || ''
|
userName: _user.UserName || ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
commit('setUserTodoList', res.Data)
|
commit('setUserTodoList', res.Data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
memberLogin({ dispatch, state,commit},_code) {
|
memberLogin({ dispatch, state,commit},_code) {
|
||||||
let _user = state.userData
|
let _user = state.userData
|
||||||
request.$get('WeChat_Login',{
|
request.$get('WeChat_Login',{
|
||||||
// request.$webGet('WebAPI_Push/WeChat/Login',{
|
// request.$webGet('WebAPI_Push/WeChat/Login',{
|
||||||
WeChat_Code: _code || '',
|
WeChat_Code: _code || '',
|
||||||
|
|
||||||
}).then(data=>{
|
}).then(data=>{
|
||||||
|
console.log('memberLogin',data)
|
||||||
if (data.Result_Code === 100) {
|
if (data.Result_Code === 100) {
|
||||||
let user = data.Result_Data
|
let user = data.Result_Data
|
||||||
if (user.Membership_Id) {
|
if (user.Membership_Id) {
|
||||||
|
commit('setUser', user)
|
||||||
dispatch('updateUser',data.Result_Data)
|
dispatch('updateUser',data.Result_Data)
|
||||||
// _this.addUserBehavior(1002) // 记录用户行为
|
// _this.addUserBehavior(1002) // 记录用户行为
|
||||||
}else{
|
}else{
|
||||||
@ -94,9 +96,7 @@ const actions = {
|
|||||||
content: '请您授权登录后再操作。',
|
content: '请您授权登录后再操作。',
|
||||||
success(res) {
|
success(res) {
|
||||||
if(res.confirm){
|
if(res.confirm){
|
||||||
|
|
||||||
util.toNextRoute('navigateTo', '/pages/register/register')
|
util.toNextRoute('navigateTo', '/pages/register/register')
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -106,31 +106,33 @@ const actions = {
|
|||||||
} else {
|
} else {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async updateUser ({dispatch, commit, state},user){
|
async updateUser ({dispatch, commit, state},user){
|
||||||
|
|
||||||
let _user = user || state.userData
|
let _user = user || state.userData
|
||||||
let _id = _user.Membership_Id
|
let _id = _user.Membership_Id
|
||||||
|
console.log('_user',_user)
|
||||||
if(!_id) return
|
if(!_id) return
|
||||||
// console.log(_user)
|
// console.log(_user)
|
||||||
request.$get('WeChat_GetBusinessMemberInfo',{Membership_Id:_id}).then(res=>{
|
request.$get('WeChat_GetBusinessMemberInfo',{Membership_Id:_id}).then(res=>{
|
||||||
|
console.log('updateUser',res)
|
||||||
// request.$webGet('WebAPI_Push/Member/GetMemberInfo',{Membership_Id:_id,memberShipId:_id}).then(res=>{
|
// request.$webGet('WebAPI_Push/Member/GetMemberInfo',{Membership_Id:_id,memberShipId:_id}).then(res=>{
|
||||||
if(res.Result_Code==100) {
|
if(res.Result_Code==100) {
|
||||||
let data = res.Result_Data
|
let data = res.Result_Data
|
||||||
data.WeChat_MiniProToken = _user.WeChat_MiniProToken
|
data.WeChat_MiniProToken = _user.WeChat_MiniProToken
|
||||||
data.WeChat_UserId = _user.WeChat_UserId
|
data.WeChat_UserId = _user.WeChat_UserId
|
||||||
data.WeChat_UserName = _user.WeChat_UserName
|
data.WeChat_UserName = _user.WeChat_UserName
|
||||||
commit('setUser', data)
|
commit('setUser', data)
|
||||||
dispatch('getTodoList')
|
dispatch('getTodoList')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
|
|
||||||
state,
|
state,
|
||||||
mutations,
|
mutations,
|
||||||
getters,
|
getters,
|
||||||
@ -144,4 +146,4 @@ export default new Vuex.Store({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user