更新
27
App.vue
@ -2,6 +2,7 @@
|
||||
//#ifdef APP-PLUS
|
||||
const jpushModule = uni.requireNativePlugin("JG-JPush");
|
||||
// #endif
|
||||
import { loginShopAccount } from "@/api/oaUser.js"
|
||||
export default {
|
||||
onLaunch: async function(info) {
|
||||
// let noticeArr = []
|
||||
@ -16,10 +17,30 @@
|
||||
// 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')
|
||||
this.$store.dispatch('initConfig');
|
||||
try {
|
||||
|
@ -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)
|
||||
|
@ -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">
|
||||
|
@ -60,6 +60,7 @@
|
||||
data: '',
|
||||
},
|
||||
uniMP: false,
|
||||
APP_token: '',
|
||||
tabList: [{
|
||||
name: '账号登录'
|
||||
},
|
||||
@ -72,7 +73,8 @@
|
||||
code: '',
|
||||
terminal: 6, //6是APP端
|
||||
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: '正在登录中'
|
||||
|
@ -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">
|
||||
|
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>
|
||||
<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">
|
||||
|
@ -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">
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
||||
|