This commit is contained in:
wpf 2023-09-04 23:18:15 +08:00
commit a85f793db7
20 changed files with 130 additions and 78 deletions

135
App.vue
View File

@ -1,64 +1,85 @@
<script>
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
onLaunch: async function(info) {
// let noticeArr = []
// jpushModule.addNotificationListener(res => {
// if (!noticeArr.includes(res.messageID)) {
// const audioContext = uni.createInnerAudioContext()
// //
// audioContext.src = `/static/audio/order.mp3`;
// // console.log(res.messageID)
// audioContext.play()
// noticeArr.push(res.messageID)
// console.log("app")
// }
// })
uni.showModal({
content: info
//#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
import { loginShopAccount } from "@/api/oaUser.js"
export default {
onLaunch: async function(info) {
// let noticeArr = []
// jpushModule.addNotificationListener(res => {
// if (!noticeArr.includes(res.messageID)) {
// const audioContext = uni.createInnerAudioContext()
// //
// audioContext.src = `/static/audio/order.mp3`;
// // console.log(res.messageID)
// audioContext.play()
// noticeArr.push(res.messageID)
// console.log("app")
// }
// })
// 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);
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的监听")
})
// #endif
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
// #endif
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import "static/css/base.css";
@import "static/css/style.scss";
/*每个页面公共css */
@import "static/css/base.css";
@import "static/css/style.scss";
view {
box-sizing: border-box;
}
view {
box-sizing: border-box;
}
</style>

View File

@ -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 loginShopAccount = (data) => oahttp.post('/login/shop_account', data)

View File

@ -1,9 +1,9 @@
<template>
<view class="oa_home" style="oaColor">
<!-- <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">
</u-navbar>
</u-navbar> -->
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
<view style="
position: absolute;
@ -20,9 +20,12 @@
" />
</view>
<!-- #ifdef APP-PLUS||H5 -->
<view v-if="!uniMP" style="height: var(--status-bar-height)"></view>
<view style="height: 30rpx"></view>
<view v-if="uniMP" style="height: 44px"></view>
<view style="height: var(--status-bar-height)"></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 v-if="uniMP" style="height: 44px;"></view> -->
<!-- #endif -->
<view class="my_info">
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">

View File

@ -60,6 +60,7 @@
data: '',
},
uniMP: false,
APP_token: '',
tabList: [{
name: '账号登录'
},
@ -72,7 +73,8 @@
code: '',
terminal: 6, //6APP
scene: 1,
register_id: ""
register_id: "",
shop_token: ""
},
tips: '获取验证码',
// refCode: null,
@ -80,6 +82,7 @@
};
},
onLoad() {
this.APP_token = uni.getStorageSync('APP_token');
this.options.data = bj;
// this.$refs.lottie.call('play');
this.initTerminal();
@ -115,6 +118,7 @@
if (!this.formData.account) return Toast('账号不能为空');
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
this.formData.shop_token = uni.getStorageSync('APP_token');
let that = this;
uni.showLoading({
title: '正在登录中'

View File

@ -5,14 +5,17 @@
<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;"/>
</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">
</u-navbar>
</u-navbar> -->
<!-- #ifdef APP-PLUS||H5 -->
<view v-if="!uniMP" style="height: var(--status-bar-height)"></view>
<view style="height: 30rpx"></view>
<view style="height: var(--status-bar-height)"></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 v-if="uniMP" style="height: 44px"></view>
<!-- <view v-if="uniMP" style="height: 44px"></view> -->
<!-- #endif -->
<view class="personage">
<view class="my_msg flex_a_c_j_sb">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 B

View File

@ -1,5 +1,5 @@
<template>
<view class="">
<view class="" style="width: 100vw; overflow: hidden;">
<view class="card">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm">
<view class="cards">

View File

@ -4,7 +4,7 @@
<view>账户入股金额</view>
<view><text class="money">{{shareholder.shareholder_money}}</text></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="contract">
<view class="left">

View File

@ -56,6 +56,8 @@
</u--form>
<!-- <button @click="addArchives" class="btn">完成更新</button> -->
<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>
</template>
@ -111,6 +113,8 @@
showDemandList: [], //
updateFlag: true,
task_id: 0,
modelShow: false, //
deleteIndex: -1, //
formData: {
id_card: '',
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;
if (e.value[1]) {
this.showDemandList.push(e.value[1]);
} else {
this.showDemandList.push(e.value[0]);
}
}, 3000),
this.$nextTick(()=>{
uni.hideLoading();
})
},
//
removeShowDemand(index) {
uni.showModal({
title: '确定删除这一部分内容吗',
success: (res) => {
if (res.confirm) this.showDemandList.splice(index, 1);
}
})
this.modelShow = true;
this.deleteIndex = index;
},
deleteDemand(index){
this.showDemandList.splice(index, 1);
this.modelShow = false;
}
},
onPullDownRefresh() {

View File

@ -1,6 +1,7 @@
import { HTTP_REQUEST_URL, HEADER, TOKENNAME, } from '@/config/app';
// import { checkLogin } from '../libs/login';
import store from '../store';
import props from '../uni_modules/uview-ui/libs/config/props';
function toLogin() {
@ -19,6 +20,7 @@ function baseRequest(url, method, data, {
noAuth = false,
noVerify = false
}) {
console.log('当前环境', process.env.NODE_ENV);
let Url = HTTP_REQUEST_URL,
header = HEADER;