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

27
App.vue
View File

@ -2,6 +2,7 @@
//#ifdef APP-PLUS //#ifdef APP-PLUS
const jpushModule = uni.requireNativePlugin("JG-JPush"); const jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif // #endif
import { loginShopAccount } from "@/api/oaUser.js"
export default { export default {
onLaunch: async function(info) { onLaunch: async function(info) {
// let noticeArr = [] // let noticeArr = []
@ -16,10 +17,30 @@
// console.log("app") // 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
}) })
if(info.referrerInfo?.extraData?.uniMP) uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP); let {
data
} = await userInfo();
this.$store.commit('setUserInfo', data);
}catch(e){
console.log(e);
}
}
console.log('App Launch') console.log('App Launch')
this.$store.dispatch('initConfig'); this.$store.dispatch('initConfig');
try { try {

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 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> <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">

View File

@ -60,6 +60,7 @@
data: '', data: '',
}, },
uniMP: false, uniMP: false,
APP_token: '',
tabList: [{ tabList: [{
name: '账号登录' name: '账号登录'
}, },
@ -72,7 +73,8 @@
code: '', code: '',
terminal: 6, //6APP terminal: 6, //6APP
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: '正在登录中'

View File

@ -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">

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> <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">

View File

@ -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">

View File

@ -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() {

View File

@ -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;