Browse Source

上传

master
前端-胡立永 8 months ago
parent
commit
77f82ad875
19 changed files with 567 additions and 301 deletions
  1. +1
    -0
      App.vue
  2. +10
    -29
      api/api.js
  3. +30
    -0
      api/model/config.js
  4. +39
    -0
      api/model/user.js
  5. +2
    -2
      config.js
  6. +3
    -0
      main.js
  7. +17
    -0
      mixins/permission.js
  8. +41
    -51
      pages/index/center.vue
  9. +74
    -29
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  10. +10
    -18
      pages_order/order/FavoriteList.vue
  11. +89
    -34
      pages_order/order/ModifyMembers.vue
  12. +155
    -13
      pages_order/order/ProcessCardOne.vue
  13. +14
    -20
      pages_order/order/WorkOrderList.vue
  14. +16
    -37
      pages_order/order/memberList.vue
  15. +40
    -35
      store/store.js
  16. +21
    -0
      uni.scss
  17. +3
    -3
      uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue
  18. +1
    -1
      uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue
  19. +1
    -29
      utils/utils.js

+ 1
- 0
App.vue View File

@ -4,6 +4,7 @@
},
onShow: function() {
// this.$store.commit('initConfig')
this.$store.commit('templateStatusInfo')
},
onHide: function() {
}


+ 10
- 29
api/api.js View File

@ -5,83 +5,64 @@ import utils from '../utils/utils.js'
let limit = {}
let debounce = {}
const models = []
const models = ['login', 'user', 'config']
const config = {
// 示例
// wxLogin : {url : '/api/wxLogin', method : 'POST',
// auth : false, showLoading : true, loadingTitle : '加载中...',
// limit : 1000
// },
getConfig: {
url: '/api/getConfig',
method: 'GET',
limit: 500
},
//轮播图-轮播图列表
queryBannerList: {
url: '/workorder/banner/queryBannerList',
method: 'GET',
auth : true,
},
//工单信息-查询工单列表
queryTemplateList: {
url: '/workorder/template/queryTemplateList',
method: 'GET',
auth : true,
},
//公告信息-查询公告列表
queryNewsList: {
url: '/workorder/news/queryNewsList',
method: 'GET',
auth : true,
},
// 公告信息-根据id查询公告信息
queryNewsById: {
url: '/workorder/news/queryNewsById',
method: 'GET',
},
// 配置信息-帮助中心
helpInfo: {
url: '/workorder/config/helpInfo',
method: 'GET',
},
// 配置信息-隐私协议
privacyInfo: {
url: '/workorder/config/privacyInfo',
method: 'GET',
},
//用户列表
queryUserList: {
url: '/workorder/user/queryUserList',
method: 'GET',
auth : true,
},
//工单信息-工序卡1(选配)详情
queryStepOne: {
url: '/workorder/template/queryStepOne',
method: 'GET',
auth : true,
},
//工单信息-工序卡2详情
queryStepTwo: {
url: '/workorder/template/queryStepTwo',
method: 'GET',
auth : true,
},
//收藏信息-我的收藏
queryCollectionList: {
url: '/workorder/collection/queryCollectionList',
method: 'GET',
auth : true,
},
//工单信息-根据id查询工单详情
queryTemplateById: {
url: '/workorder/template/queryTemplateById',
method: 'GET',
auth : true,
},
//工单信息-工序卡3详情
queryStepThree: {
url: '/workorder/template/queryStepThree',
method: 'GET',
auth : true,
},
}


+ 30
- 0
api/model/config.js View File

@ -0,0 +1,30 @@
// 配置相关接口
const api = {
// 示例
getConfig: {
url: '/api/getConfig',
method: 'GET',
limit: 500,
},
//配置信息-查询工单状态配置
templateStatusInfo: {
url: '/workorder/config/templateStatusInfo',
method: 'GET',
},
// 配置信息-帮助中心
helpInfo: {
url: '/workorder/config/helpInfo',
method: 'GET',
},
// 配置信息-隐私协议
privacyInfo: {
url: '/workorder/config/privacyInfo',
method: 'GET',
},
}
export default api

+ 39
- 0
api/model/user.js View File

@ -0,0 +1,39 @@
// 用户相关接口
const api = {
//用户信息-根据id查询用户信息
queryUserById: {
url: '/workorder/user/queryUserById',
method: 'GET',
auth : true,
},
//用户信息-资料修改
updateUser: {
url: '/workorder/user/updateUser',
method: 'POST',
auth : true,
showLoading : true,
},
//用户列表
queryUserList: {
url: '/workorder/user/queryUserList',
method: 'GET',
auth : true,
},
//账号密码登录
login: {
url: '/workorder/user/login',
method: 'POST',
showLoading : true,
},
//注册
register: {
url: '/workorder/user/register',
method: 'POST',
showLoading : true,
},
}
export default api

+ 2
- 2
config.js View File

@ -7,13 +7,13 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
const type = 'dev'
// 环境配置
const config = {
dev : {
baseUrl : 'http://www.gcosc.fun:82',
baseUrl : 'http://augcl.natapp1.cc/workorder-admin',
},
prod : {
baseUrl : 'https://workorderadmin.augcl.com/workorder-admin',


+ 3
- 0
main.js View File

@ -13,6 +13,7 @@ import store from '@/store/store'
import './config'
import './utils/index.js'
import mixinPermission from '@/mixins/permission.js'
//组件注册
import configPopup from '@/components/config/configPopup.vue'
@ -21,6 +22,8 @@ import navbar from '@/components/base/navbar.vue'
Vue.component('configPopup',configPopup)
Vue.component('navbar',navbar)
Vue.mixin(mixinPermission)
const app = new Vue({
...App,
store,


+ 17
- 0
mixins/permission.js View File

@ -0,0 +1,17 @@
import { mapState } from 'vuex'
export default {
data() {
return {
}
},
computed: {
...mapState(['permissions']),
},
methods: {
isPermission(permission){
return this.permissions.includes(permission)
},
}
}

+ 41
- 51
pages/index/center.vue View File

@ -3,15 +3,15 @@
<view class="backimg">
<view class="head-portrait">
<image :src="userInfo.image" mode="aspectFill"></image>
</view>
<view class="id">
李晓春
{{ userInfo.name }}
</view>
</view>
<view class="box">
<view class="index"
<view class="index"
@click="$utils.navigateTo('/pages_order/order/memberList')">
<view class="indus">
<view class="horn">
@ -25,13 +25,12 @@
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<hr />
<view class="index" @click="$utils.navigateTo('/pages_order/order/ChangePassword')">
<view class="indus">
<view class="horn">
<uv-icon name="lock-fill" size="30rpx"></uv-icon>
</view>
<view class="words" >
<view class="words">
修改密码
</view>
</view>
@ -39,14 +38,12 @@
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<hr />
<view class="index"
@click="$utils.navigateTo('/pages_order/order/FavoriteList')">
<view class="index" @click="$utils.navigateTo('/pages_order/order/FavoriteList')">
<view class="indus">
<view class="horn">
<uv-icon name="star-fill" size="30rpx"></uv-icon>
</view>
<view class="words" >
<view class="words">
收藏列表
</view>
</view>
@ -54,7 +51,6 @@
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<hr />
<view class="index" @click="$utils.navigateTo('/pages_order/order/HelpCenter')">
<view class="indus">
<view class="horn">
@ -68,7 +64,6 @@
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<hr />
<view class="index" @click="$utils.navigateTo('/pages_order/order/PrivacyAgreement')">
<view class="indus">
<view class="horn">
@ -82,55 +77,47 @@
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
<hr />
<view class="index" @click="$store.commit('logout')">
<view class="indus">
<view class="horn">
<uv-icon name="info-circle-fill" size="30rpx"></uv-icon>
</view>
<view class="words">
退出登录
</view>
</view>
<view class="arrow">
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
</view>
<tabber select="1" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import {
mapGetters
} from 'vuex'
import userShopCommission from '@/components/userShop/userShopCommission.vue'
import { mapState } from 'vuex'
export default {
components: {
tabber,
userShopCommission,
},
computed: {
...mapGetters(['userShop']),
...mapState(['userInfo']),
},
data() {
return {}
},
onShow() {
this.$store.commit('getUserInfo')
},
methods: {
headBtn() {
let self = this
uni.showModal({
title: '演示切换角色之后的效果',
success(res) {
if (res.confirm) {
self.$store.state.shop = !self.$store.state.shop
}
}
})
},
}
}
</script>
<style scoped lang="scss">
hr {
width: 80%; /* 设置为视口宽度的一半 */
margin: auto; /* 自动边距,实现水平居中 */
border: none; /* 移除默认边框 */
border-top: 1px solid #ccc; /* 设置顶部边框,可以根据需要更改颜色和大小 */
clear: both; /* 如果有浮动元素,清除浮动确保hr在它下方 */
}
.page {
.backimg {
@ -146,7 +133,11 @@
.head-portrait {
height: 150rpx;
width: 150rpx;
background-color: greenyellow;
image{
width: 100%;
height: 100%;
border-radius: 20rpx;
}
}
.id {
@ -155,35 +146,34 @@
}
}
.box{
margin-top: 80rpx;
.box {
margin-top: 30rpx;
.index {
padding: 0rpx 60rpx;
margin: 30rpx 0rpx;
padding: 30rpx 0;
margin: 0 60rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #ccc;
.indus {
display: flex;
.words {
margin: 0rpx 5rpx;
font-size: 27rpx;
opacity: 0.8;
}
.horn {
margin: 5rpx 10rpx;
}
}
.arrow {
padding: 8rpx;
}
}
}


+ 74
- 29
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -10,8 +10,17 @@
<!-- 头像 -->
<view class="userIamge">
<view>
<img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
<view
@click="upload">
<image
:src="form.image"
v-if="form.image"
mode="aspectFill" style="width: 100%;height: 100%;">
<image
src="/static/image/center/11.svg"
v-else
style="width: 100%;height: 100%;">
</view>
</view>
@ -32,8 +41,8 @@
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
style="color: #fd5100"
@click="$refs.popup.open('getUserAgreement')">服务协议</span>
style="color: #fd5100"
@click="$refs.popup.open('getUserAgreement')">服务协议</span>
</view>
</view>
</uv-checkbox-group>
@ -89,16 +98,13 @@
</view>
<!-- tab -->
<!-- <view class="bottomTab">
<span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(0)'>注册账号</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(1)'>账号登录</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(2)'>忘记密码</span>
</view> -->
<view class="bottomTab">
<text
:key="index"
v-for="(item, index) in titleList"
:class="{tabbarItemActive : titleIndex == index}"
@click='changePage(index)'>{{ item }}</text>
</view>
</view>
@ -115,16 +121,17 @@
configPopup
},
onLoad(option) {
this.titleIndex = option.index || 1
this.titleIndex = option.index || 0
},
data() {
return {
titleIndex: 0,
titleList: ['注册', '登录', '重置密码'],
titleList: ['登录', '注册'],//, ''
checkboxValue: [],
form: {
account: '13135294009',
password: 'lzx123456',
image : '',
account: '李靖1',
password: '123456',
},
form1: {
userName: '',
@ -137,6 +144,17 @@
}
},
methods: {
//
upload(){
if(this.titleIndex != 1){
return
}
this.$Oss.ossUploadImage({
success : url => {
this.form.image = url
}
})
},
submit(){
if(!this.checkboxValue.length){
return uni.showToast({
@ -152,7 +170,40 @@
return
}
this.$store.commit('accountLogin', this.form)
//
if(this.titleIndex == 1){
if(this.$utils.verificationAll(this.form, {
image: '请上传头像',
})){
return
}
this.$api('register', {
name : this.form.account,
password : this.form.password,
image : this.form.image,
}, res => {
if(res.code == 200){
uni.showToast({
title: '注册成功,请登录',
icon: 'none'
})
this.form = {
image : '',
account: '',
password: '',
}
this.titleIndex = 0
}
})
return
}
this.$store.commit('accountLogin', {
userName : this.form.account,
password : this.form.password,
})
},
//
changePage(index) {
@ -224,7 +275,7 @@
display: flex;
justify-content: center;
height: 10vh;
>view:nth-of-type(1) {
width: 25%;
height: 100%;
@ -257,7 +308,6 @@
display: flex;
justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex;
justify-content: center;
@ -266,7 +316,6 @@
height: 80rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
@ -274,18 +323,14 @@
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
justify-content: space-around;
padding: 0 60rpx;
margin-top: 30rpx;
color: #9c9fa4;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
}
.forgetPassword {


+ 10
- 18
pages_order/order/FavoriteList.vue View File

@ -16,7 +16,7 @@
<!-- 标签选项 -->
<view class="Tabs">
<uv-tabs :list="tabs" @click="click" ></uv-tabs>
<uv-tabs :list="statusList" @click="click" ></uv-tabs>
</view>
<view class="Urgent-Work-Order">
@ -35,9 +35,7 @@
import tabber from '@/components/base/tabbar.vue'
import Collection from '@/components/work/Collection.vue'
import mixinsList from '@/mixins/list.js'
import {
mapGetters
} from 'vuex'
import { mapState } from 'vuex'
export default {
mixins: [mixinsList],
components: {
@ -46,31 +44,25 @@
},
data() {
return {
mixinsListApi : 'queryTemplateList',
tabs: [{
name: '所有',
}, {
name: '备料中',
}, {
name: '本体加工'
}, {
name: '气密检测'
}, {
name: '挂机中'
}],
mixinsListApi : 'queryCollectionList',
tagIndex : 0,
}
},
computed: {
...mapState(['statusList']),
},
methods: {
valChange(){
},
click(item) {
console.log('item', item);
if(item.id){
this.queryParams.status = item.id
}else{
delete this.queryParams.status
}
this.getData()
},
}
}
</script>


+ 89
- 34
pages_order/order/ModifyMembers.vue View File

@ -6,35 +6,49 @@
<view class="box">
<view class="ChangeheadPortrait">
<view class="headPortrait">
</view>
<view class="Bo">
<uv-icon name="edit-pen" size="60"></uv-icon>
<view
@click="upload"
class="headPortrait">
<!-- 如果有就显示数据的头像 -->
<image
v-if="detail.image"
:src="detail.image"
mode=""></image>
<!-- 如果没有就显示默认的 -->
<image
v-else
src="/pages_order/static/auth/headImage.png"
mode=""></image>
</view>
</view>
<view class="ChangeAccountpassword">
<view class="ChangeName">
员工账号
<uv-input placeholder="请输入员工账号" border="bottom"></uv-input>
<view class="Bo">
<uv-input placeholder="请输入员工账号"
v-model="detail.name"
border="bottom"></uv-input>
<!-- <view class="Bo">
<uv-icon name="edit-pen" size="60"></uv-icon>
</view>
</view> -->
</view>
<view class="Changepassword">
员工密码
<uv-input placeholder="请输入员工密码" border="bottom"></uv-input>
<view class="Bo">
<uv-input placeholder="请输入员工密码"
v-model="detail.password"
border="bottom"></uv-input>
<!-- <view class="Bo">
<uv-icon name="edit-pen" size="60"></uv-icon>
</view>
</view> -->
</view>
</view>
<view class="preservation">
<view class="uni-color-btn"
@click="submit"
style="width: 70%;">
保存
</view>
</view>
@ -46,15 +60,66 @@
export default {
data() {
return {
value: ''
id : 0,
detail : {
},
}
},
onLoad(args) {
this.id = args.id
},
onShow() {
this.getDetail()
},
methods: {
change(e) {
console.log('change', e);
}
upload(){
this.$Oss.ossUploadImage({
success : url => {
console.log(url);
this.detail.image = url
}
})
},
getDetail(){
this.$api('queryUserById', {
userId : this.id
}, res =>{
if(res.code == 200){
this.detail = res.result
}
})
},
submit(){
//
if(this.$utils
.verificationAll(this.detail, {
image : '请上传员工头像',
name : '请输入员工账号',
password : '请输入员工密码',
})){
return
}
//
this.$api('updateUser', {
id : this.detail.id,
image : this.detail.image,
name : this.detail.name,
password : this.detail.password,
roleId : this.detail.roleId,
}, res =>{
if(res.code == 200){
uni.showToast({
title: '保存成功',
icon: 'none'
})
// 1
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
}
}
</script>
@ -72,16 +137,14 @@
.ChangeheadPortrait {
display: flex;
align-items: center;
.headPortrait {
height: 150rpx;
width: 150rpx;
background-color: yellowgreen;
.Bo{
margin-right: 50rpx;
image{
width: 100%;
height: 100%;
border-radius: 20rpx;
}
}
}
@ -109,14 +172,6 @@
}
.preservation {
background-color: #169bd5;
padding: 35rpx 70rpx;
border-radius: 20rpx;
}
}
}
</style>

+ 155
- 13
pages_order/order/ProcessCardOne.vue View File

@ -1,11 +1,115 @@
<template>
<view class="page">
<navbar title="工序卡1" leftClick @leftClick="$utils.navigateBack" />
<view class="">
{{StepOne.operator}}
<view class="info">
<view class="Work-List">
<view class="label">
中试作业员
</view>
<view class="text">
<input type="text" v-model="StepOne.operator"/>
</view>
</view>
<view class="Work-List">
<view class="label">
气缸料号1
</view>
<view class="text">
<input type="text" v-model="StepOne.cylinder1"/>
</view>
</view>
<view class="Work-List">
<view class="label">
气缸料号2
</view>
<view class="text">
<input type="text" v-model="StepOne.cylinder2"/>
</view>
</view>
<view class="Work-List">
<view class="label">
活塞料号1
</view>
<view class="text">
<input type="text" v-model="StepOne.piston1"/>
</view>
</view>
<view class="Work-List">
<view class="label">
活塞料号2
</view>
<view class="text">
<input type="text" v-model="StepOne.piston2"/>
</view>
</view>
<view class="Work-List">
<view class="label">
滑片料号1
</view>
<view class="text">
<input type="text" v-model="StepOne.scribing1"/>
</view>
</view>
<view class="Work-List">
<view class="label">
滑片料号2
</view>
<view class="text">
<input type="text" v-model="StepOne.scribing2"/>
</view>
</view>
</view>
<view class="list">
<view class="item-box">
<view class="title">
上钢选配
</view>
<view class="list-box"
:key="stepIndex"
v-for="(step, stepIndex) in stepList">
<view class="title">
钢化膜
</view>
<view class="item-input">
<view class="Work-List"
:key="index"
v-for="(item, index) in 20"
>
<view class="label">
规格{{ index + 1 }}
</view>
<view class="text">
<input type="text"
v-model="step['param' + (index + 1)]"/>
</view>
<view class="text"
style="margin-left: 20rpx;">
{{ step.specs }}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="uni-color-btn"
@click="submit">
保存
</view>
</view>
</view>
</template>
<script>
@ -14,33 +118,71 @@
return {
id: 0,
StepOne: {},
stepList : [],
}
},
onLoad(arg) {
this.id = arg.id
console.log(arg);
this.queryStepOne()
},
methods: {
queryStepOne() {
this.$api('queryStepOne', {
templateId: this.id
}, res => {
if (res.code == 200) {
this.StepOne = res.result.workorderGeneralStepone
this.stepList = res.result.workorderParamSteponeList
}
})
},
submit(){
console.log(this.stepList);
},
}
}
</script>
<style>
<style scoped lang="scss">
.page{
padding-bottom: 200rpx;
.Work-List{
display: flex;
padding: 16rpx 0rpx;
align-items: center;
.label{
width: 200rpx;
flex-shrink: 0;
}
.text{
input{
background-color: #eee;
padding: 10rpx 20rpx;
border-radius: 20rpx;
}
}
}
.info{
padding: 30rpx;
input{
width: 430rpx;
}
}
.list{
padding: 0 30rpx;
.list-box{
padding: 20rpx 0;
padding-left: 40rpx;
.item-input{
padding-left: 40rpx;
.label{
width: 130rpx;
}
}
}
input{
width: 320rpx;
}
}
}
</style>

+ 14
- 20
pages_order/order/WorkOrderList.vue View File

@ -12,7 +12,7 @@
<!-- 标签选项 -->
<view class="Tabs">
<uv-tabs :list="tabs"
<uv-tabs :list="statusList"
@click="clickTab"></uv-tabs>
</view>
@ -20,7 +20,7 @@
<WorkOrderitem
:key="index"
v-for="(item,index) in list" :obj="item"
@click="$utils.navigateTo('/pages_order/order/WorkOrders')" />
@click="$utils.navigateTo('/pages_order/order/WorkOrders?id=' + item.id)"/>
</view>
@ -31,6 +31,7 @@
<script>
import WorkOrderitem from '@/components/work/WorkOrderitem.vue'
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins: [mixinsList],
components: {
@ -39,41 +40,34 @@
data() {
return {
mixinsListApi: 'queryTemplateList',
tabs: [{
name: '所有',
}, {
name: '备料中',
}, {
name: '本体加工'
}, {
name: '气密检测'
}, {
name: '挂机中'
}],
}
},
computed: {
...mapState(['statusList']),
},
methods: {
clickTab(){},
clickTab(item){
if(item.id){
this.queryParams.status = item.id
}else{
delete this.queryParams.status
}
this.getData()
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 100rpx;
.search{
margin: 20rpx;
}
.Tabs {
display: flex;
justify-content: center;
}
.Urgent-Work-Order {
padding: 20rpx;
margin: 0 30rpx;
}
}
</style>

+ 16
- 37
pages_order/order/memberList.vue View File

@ -2,31 +2,34 @@
<!-- 成员列表 -->
<view class="page">
<navbar title="成员列表" leftClick @leftClick="$utils.navigateBack" />
<view class="search">
<uv-search placeholder="输入员工姓名进行搜索" bgColor="#fff" height="80"></uv-search>
</view>
<view class="Memberinformation" >
<view class="box" v-for="(item,index) in list" :key="index">
<view class="box"
v-for="(item, index) in list"
:key="index">
<view class="Top">
<view class="userName" >
{{item.name}}
</view>
<view class="modify" @click="$utils.navigateTo('/pages_order/order/ModifyMembers')">
<view class="modify"
@click="$utils.navigateTo('/pages_order/order/ModifyMembers?id=' + item.id)">
修改
</view>
</view>
<view class="AccountPassword">
<view class="Account">
<!-- <view class="Account">
账号{{item.name}}
</view>
</view> -->
<view class="password">
密码{{item.password}}
</view>
<view class="password">
角色{{item.roleId_dictText}}
</view>
</view>
<view class="item">
<view class="itemm">
创建时间{{item.createTime}}
@ -35,18 +38,11 @@
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import {
mapGetters
} from 'vuex'
import { mapGetters } from 'vuex'
export default {
mixins: [mixinsList],
data() {
@ -55,54 +51,37 @@
}
},
onLoad() {
this.queryUserList()
},
methods: {
queryUserList() {
this.$api('queryUserList', res => {
if (res.code == 200) {
this.item = res.result.records
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 100rpx;
.search {
margin: 20rpx;
}
.Memberinformation {
margin: 90rpx 30rpx;
margin: 0 30rpx;
.box {
/* margin-top: 20rpx;
height: 220rpx;
border: 1rpx solid rgb(99, 187, 211);
border-radius: 20rpx;
padding: 20rpx 25rpx; */
margin-top: 20rpx;
border: 6rpx solid rgb(99, 187, 211);
margin: 30rpx 0;
border-radius: 25rpx;
padding: 15rpx;
background-color: #fff;
box-shadow: 0 0 10rpx 10rpx #00000009;
font-size: 28rpx;
.Top {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
.userName {
font-size: 33rpx;
}
.modify {
font-size: 33rpx;
color: rgb(99, 187, 211);
margin-right: 30rpx;
}


+ 40
- 35
store/store.js View File

@ -9,14 +9,11 @@ import api from '@/api/api.js'
const store = new Vuex.Store({
state: {
configList: [], //配置列表
shop : false,
userInfo : {}, //用户信息
permissions : [],//权限列表
statusList : [],
},
getters: {
// 角色 true为水洗店 false为酒店
userShop(state){
return state.shop
}
},
mutations: {
// 初始化配置
@ -36,47 +33,55 @@ const store = new Vuex.Store({
})
})
},
login(state){
uni.showLoading({
title: '登录中...'
// 账号密码登录
accountLogin(state, form){
api('login', form, res => {
if(res.code == 200){
state.userInfo = res.result
uni.setStorageSync('token', res.result.id)
uni.navigateBack(-1)
}
})
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
return
},
// 退出登录
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.role = false
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/index/index'
})
}
api('wxLogin', {
code : res.code
}, res => {
uni.hideLoading()
if(res.code != 200){
return
}
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}else{
uni.navigateBack(-1)
}
})
}
})
},
// 获取个人信息
getUserInfo(state){
api('infoGetInfo', res => {
api('queryUserById', {
userId : uni.getStorageSync('token')
}, res => {
if(res.code == 200){
state.userInfo = res.result
}
})
},
// 获取工单状态列表
templateStatusInfo(state){
api('templateStatusInfo', res => {
if(res.code == 200){
state.statusList = [
{
name : '全部'
},
...res.result.records,
]
}
})
},
},
actions: {},
})


+ 21
- 0
uni.scss View File

@ -77,4 +77,25 @@ $uni-font-size-paragraph:15px;
:root{
--uni-color: $uni-color;
}
.uni-color-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
background: $uni-color;
color: #fff;
text-align: center;
font-size: 28rpx;
}
.uni-uncolor-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
border: 1px solid $uni-color;
color: $uni-color;
text-align: center;
font-size: 28rpx;
}

+ 3
- 3
uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue View File

@ -11,7 +11,7 @@
<uv-icon
:name="icon"
:color="color"
size="19"
size="30"
></uv-icon>
</view>
</slot>
@ -43,13 +43,13 @@
<uv-icon
v-if="mode === 'link'"
name="arrow-right"
:size="17"
:size="30"
:color="color"
></uv-icon>
<uv-icon
v-if="mode === 'closable'"
name="close"
:size="16"
:size="30"
:color="color"
@click="close"
></uv-icon>


+ 1
- 1
uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue View File

@ -11,7 +11,7 @@
<uv-icon
:name="icon"
:color="color"
size="19"
size="30"
></uv-icon>
</view>
</slot>


+ 1
- 29
utils/utils.js View File

@ -58,34 +58,6 @@ function verificationAll(data, msg){
}
}
// let Msgs = {
// default : msg || '表单数据未填写'
// }
// if(typeof msg == 'object'){
// Msgs = {
// default : '表单数据未填写',
// ...msg,
// }
// }
// if (!data){
// uni.showToast({
// title: Msgs.default,
// icon: "none"
// })
// return true
// }
// for (let key in data) {
// if (!data[key] || data[key] === "") {
// uni.showToast({
// title: (Msgs[key] || Msgs.default),
// icon: "none"
// })
// return true
// }
// }
return false
}
@ -186,7 +158,7 @@ export const toLogin = function(){
}
time = new Date().getTime()
uni.navigateTo({
url: '/pages_order/auth/wxLogin'
url: '/pages_order/auth/loginAndRegisterAndForgetPassword'
})
}
}()


Loading…
Cancel
Save