更新
135
App.vue
@ -1,64 +1,85 @@
|
|||||||
<script>
|
<script>
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||||
// #endif
|
// #endif
|
||||||
export default {
|
import { loginShopAccount } from "@/api/oaUser.js"
|
||||||
onLaunch: async function(info) {
|
export default {
|
||||||
// let noticeArr = []
|
onLaunch: async function(info) {
|
||||||
// jpushModule.addNotificationListener(res => {
|
// let noticeArr = []
|
||||||
// if (!noticeArr.includes(res.messageID)) {
|
// jpushModule.addNotificationListener(res => {
|
||||||
// const audioContext = uni.createInnerAudioContext()
|
// if (!noticeArr.includes(res.messageID)) {
|
||||||
// // 设置音频文件地址
|
// const audioContext = uni.createInnerAudioContext()
|
||||||
// audioContext.src = `/static/audio/order.mp3`;
|
// // 设置音频文件地址
|
||||||
// // console.log(res.messageID)
|
// audioContext.src = `/static/audio/order.mp3`;
|
||||||
// audioContext.play()
|
// // console.log(res.messageID)
|
||||||
// noticeArr.push(res.messageID)
|
// audioContext.play()
|
||||||
// console.log("app的监听")
|
// noticeArr.push(res.messageID)
|
||||||
// }
|
// console.log("app的监听")
|
||||||
// })
|
// }
|
||||||
uni.showModal({
|
// })
|
||||||
content: info
|
|
||||||
|
// uni.showModal({
|
||||||
|
// content: info.referrerInfo.extraData
|
||||||
|
// })
|
||||||
|
|
||||||
|
if (info.referrerInfo?.extraData?.uniMP) {
|
||||||
|
uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
|
||||||
|
uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token);
|
||||||
|
try{
|
||||||
|
let res = await loginShopAccount({
|
||||||
|
shop_token: info.referrerInfo?.extraData?.token
|
||||||
|
});
|
||||||
|
this.$store.commit('SET_USERINFO', {
|
||||||
|
user: data,
|
||||||
|
token: res.data.token
|
||||||
|
})
|
||||||
|
let {
|
||||||
|
data
|
||||||
|
} = await userInfo();
|
||||||
|
this.$store.commit('setUserInfo', data);
|
||||||
|
}catch(e){
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('App Launch')
|
||||||
|
this.$store.dispatch('initConfig');
|
||||||
|
try {
|
||||||
|
if (!this.$store.state.app.token) uni.reLaunch({
|
||||||
|
url: '/pages/oaLogin/oaLogin'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/oaLogin/oaLogin'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
const audioContext = uni.createInnerAudioContext()
|
||||||
|
// 设置音频文件地址
|
||||||
|
audioContext.src = '/static/mp3/order.mp3'
|
||||||
|
// 播放音频
|
||||||
|
//#ifdef APP-PLUS
|
||||||
|
jpushModule.addNotificationListener(res => {
|
||||||
|
if (res.notificationEventType == 'notificationOpened') return
|
||||||
|
audioContext.play()
|
||||||
|
uni.vibrateLong();
|
||||||
|
console.log("app的监听")
|
||||||
})
|
})
|
||||||
if(info.referrerInfo?.extraData?.uniMP) uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
|
// #endif
|
||||||
console.log('App Launch')
|
console.log('App Show')
|
||||||
this.$store.dispatch('initConfig');
|
},
|
||||||
try {
|
onHide: function() {
|
||||||
if (!this.$store.state.app.token) uni.reLaunch({
|
console.log('App Hide')
|
||||||
url: '/pages/oaLogin/oaLogin'
|
}
|
||||||
})
|
}
|
||||||
} catch (e) {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/oaLogin/oaLogin'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow: function() {
|
|
||||||
const audioContext = uni.createInnerAudioContext()
|
|
||||||
// 设置音频文件地址
|
|
||||||
audioContext.src = '/static/mp3/order.mp3'
|
|
||||||
// 播放音频
|
|
||||||
//#ifdef APP-PLUS
|
|
||||||
jpushModule.addNotificationListener(res => {
|
|
||||||
if (res.notificationEventType == 'notificationOpened') return
|
|
||||||
audioContext.play()
|
|
||||||
uni.vibrateLong();
|
|
||||||
console.log("app的监听")
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
console.log('App Show')
|
|
||||||
},
|
|
||||||
onHide: function() {
|
|
||||||
console.log('App Hide')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import "static/css/base.css";
|
@import "static/css/base.css";
|
||||||
@import "static/css/style.scss";
|
@import "static/css/style.scss";
|
||||||
|
|
||||||
view {
|
view {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -60,3 +60,8 @@ export const userPostsms = (data) => oahttp.post('/user/postsms', data)
|
|||||||
* 注销账号
|
* 注销账号
|
||||||
*/
|
*/
|
||||||
export const destroyAccount = (data) => oahttp.post('/user/destroy_account', data)
|
export const destroyAccount = (data) => oahttp.post('/user/destroy_account', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商城登录
|
||||||
|
*/
|
||||||
|
export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="oa_home" style="oaColor">
|
<view class="oa_home" style="oaColor">
|
||||||
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
||||||
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
<!-- <u-navbar @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
||||||
leftIconColor=" #fff" :autoBack="false">
|
leftIconColor=" #fff" :autoBack="false">
|
||||||
</u-navbar>
|
</u-navbar> -->
|
||||||
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
|
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
|
||||||
<view style="
|
<view style="
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -20,9 +20,12 @@
|
|||||||
" />
|
" />
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view v-if="!uniMP" style="height: var(--status-bar-height)"></view>
|
<view style="height: var(--status-bar-height)"></view>
|
||||||
<view style="height: 30rpx"></view>
|
<view v-if="uniMP" style="height: 44px;">
|
||||||
<view v-if="uniMP" style="height: 44px"></view>
|
<u-icon name="arrow-left" color="#fff" size="20" @click="leftClick"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view v-else style="height: 30rpx"></view>
|
||||||
|
<!-- <view v-if="uniMP" style="height: 44px;"></view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="my_info">
|
<view class="my_info">
|
||||||
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
data: '',
|
data: '',
|
||||||
},
|
},
|
||||||
uniMP: false,
|
uniMP: false,
|
||||||
|
APP_token: '',
|
||||||
tabList: [{
|
tabList: [{
|
||||||
name: '账号登录'
|
name: '账号登录'
|
||||||
},
|
},
|
||||||
@ -72,7 +73,8 @@
|
|||||||
code: '',
|
code: '',
|
||||||
terminal: 6, //6是APP端
|
terminal: 6, //6是APP端
|
||||||
scene: 1,
|
scene: 1,
|
||||||
register_id: ""
|
register_id: "",
|
||||||
|
shop_token: ""
|
||||||
},
|
},
|
||||||
tips: '获取验证码',
|
tips: '获取验证码',
|
||||||
// refCode: null,
|
// refCode: null,
|
||||||
@ -80,6 +82,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.APP_token = uni.getStorageSync('APP_token');
|
||||||
this.options.data = bj;
|
this.options.data = bj;
|
||||||
// this.$refs.lottie.call('play');
|
// this.$refs.lottie.call('play');
|
||||||
this.initTerminal();
|
this.initTerminal();
|
||||||
@ -115,6 +118,7 @@
|
|||||||
if (!this.formData.account) return Toast('账号不能为空');
|
if (!this.formData.account) return Toast('账号不能为空');
|
||||||
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
|
||||||
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
|
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
|
||||||
|
this.formData.shop_token = uni.getStorageSync('APP_token');
|
||||||
let that = this;
|
let that = this;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在登录中'
|
title: '正在登录中'
|
||||||
|
@ -5,14 +5,17 @@
|
|||||||
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
|
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
|
||||||
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #0122c7;"/>
|
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #0122c7;"/>
|
||||||
</view>
|
</view>
|
||||||
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
<!-- <u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
|
||||||
leftIconColor=" #fff" :autoBack="false">
|
leftIconColor=" #fff" :autoBack="false">
|
||||||
</u-navbar>
|
</u-navbar> -->
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view v-if="!uniMP" style="height: var(--status-bar-height)"></view>
|
<view style="height: var(--status-bar-height)"></view>
|
||||||
<view style="height: 30rpx"></view>
|
<view v-if="uniMP" style="height: 44px;">
|
||||||
|
<u-icon name="arrow-left" color="#fff" size="20" @click="leftClick"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view v-else style="height: 30rpx"></view>
|
||||||
<!-- <view style="height: 100rpx"></view> -->
|
<!-- <view style="height: 100rpx"></view> -->
|
||||||
<view v-if="uniMP" style="height: 44px"></view>
|
<!-- <view v-if="uniMP" style="height: 44px"></view> -->
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="personage">
|
<view class="personage">
|
||||||
<view class="my_msg flex_a_c_j_sb">
|
<view class="my_msg flex_a_c_j_sb">
|
||||||
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 892 B |
Before Width: | Height: | Size: 667 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 779 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 785 B |
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="" style="width: 100vw; overflow: hidden;">
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
|
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
|
||||||
<view class="cards">
|
<view class="cards">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<view>账户入股金额</view>
|
<view>账户入股金额</view>
|
||||||
<view><text class="money">{{shareholder.shareholder_money}}</text>元</view>
|
<view><text class="money">{{shareholder.shareholder_money}}</text>元</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!is_village" style="text-align: center;color: #aaa;">暂无直属上级公司</view>
|
<view v-if="!shareholder.is_village" style="text-align: center;color: #aaa;">暂无直属上级公司</view>
|
||||||
<view class="card" v-else-if="shareholder.is_contract">
|
<view class="card" v-else-if="shareholder.is_contract">
|
||||||
<view class="contract">
|
<view class="contract">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
|
@ -56,6 +56,8 @@
|
|||||||
</u--form>
|
</u--form>
|
||||||
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
|
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
|
||||||
<mybtn text="完成更新" @click="$u.throttle(addArchives, 2000)"></mybtn>
|
<mybtn text="完成更新" @click="$u.throttle(addArchives, 2000)"></mybtn>
|
||||||
|
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
|
||||||
|
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -111,6 +113,8 @@
|
|||||||
showDemandList: [], //更多需求展示列表
|
showDemandList: [], //更多需求展示列表
|
||||||
updateFlag: true,
|
updateFlag: true,
|
||||||
task_id: 0,
|
task_id: 0,
|
||||||
|
modelShow: false, // 是否显示删除提示框
|
||||||
|
deleteIndex: -1, // 删除标记
|
||||||
formData: {
|
formData: {
|
||||||
id_card: '',
|
id_card: '',
|
||||||
sex: '',
|
sex: '',
|
||||||
@ -210,22 +214,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 确认添加需求
|
// 确认添加需求
|
||||||
changeDemand: throttle(function(e) {
|
changeDemand(e){
|
||||||
|
this.$u.throttle(()=>this.addDemand(e), 2000)
|
||||||
|
},
|
||||||
|
addDemand(e){
|
||||||
|
uni.showLoading({
|
||||||
|
title: '添加中',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
this.demandShow = false;
|
this.demandShow = false;
|
||||||
if (e.value[1]) {
|
if (e.value[1]) {
|
||||||
this.showDemandList.push(e.value[1]);
|
this.showDemandList.push(e.value[1]);
|
||||||
} else {
|
} else {
|
||||||
this.showDemandList.push(e.value[0]);
|
this.showDemandList.push(e.value[0]);
|
||||||
}
|
}
|
||||||
}, 3000),
|
this.$nextTick(()=>{
|
||||||
|
uni.hideLoading();
|
||||||
|
})
|
||||||
|
},
|
||||||
// 删除需求
|
// 删除需求
|
||||||
removeShowDemand(index) {
|
removeShowDemand(index) {
|
||||||
uni.showModal({
|
this.modelShow = true;
|
||||||
title: '确定删除这一部分内容吗',
|
this.deleteIndex = index;
|
||||||
success: (res) => {
|
},
|
||||||
if (res.confirm) this.showDemandList.splice(index, 1);
|
deleteDemand(index){
|
||||||
}
|
this.showDemandList.splice(index, 1);
|
||||||
})
|
this.modelShow = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { HTTP_REQUEST_URL, HEADER, TOKENNAME, } from '@/config/app';
|
import { HTTP_REQUEST_URL, HEADER, TOKENNAME, } from '@/config/app';
|
||||||
// import { checkLogin } from '../libs/login';
|
// import { checkLogin } from '../libs/login';
|
||||||
import store from '../store';
|
import store from '../store';
|
||||||
|
import props from '../uni_modules/uview-ui/libs/config/props';
|
||||||
|
|
||||||
|
|
||||||
function toLogin() {
|
function toLogin() {
|
||||||
@ -19,6 +20,7 @@ function baseRequest(url, method, data, {
|
|||||||
noAuth = false,
|
noAuth = false,
|
||||||
noVerify = false
|
noVerify = false
|
||||||
}) {
|
}) {
|
||||||
|
console.log('当前环境', process.env.NODE_ENV);
|
||||||
let Url = HTTP_REQUEST_URL,
|
let Url = HTTP_REQUEST_URL,
|
||||||
header = HEADER;
|
header = HEADER;
|
||||||
|
|
||||||
|