123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view>
-
- <u-navbar
- title="设置"
- title-color="#fff"
- :custom-back="customBack"
- :border-bottom="false"
- back-icon-color="#CCE8FF"
- :background="{background: 'linear-gradient(145deg, #41AFF9 0%, #2D8CFB 100%)' }"></u-navbar>
-
- <view class="cell-group" style="margin-top: 30rpx;">
- <u-cell-group>
- <u-cell-item title="修改密码" @click="openPage('pages/modifypwd/modifypwd')">
- <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
- </u-cell-item>
- <u-cell-item title="打印走纸" @click="onPrintFeed()">
- <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
- </u-cell-item>
- <u-cell-item title="退出登录" @click="onLoginOut()">
- <u-icon slot="icon" custom-prefix="custom-icon" size="35" name="wodecheliang"></u-icon>
- </u-cell-item>
- </u-cell-group>
- </view>
-
- </view>
- </template>
- <script>
- //#ifdef APP-PLUS
- var device = uni.requireNativePlugin("DeviceInfo")
- //#endif
- export default{
- data(){
- return{
-
- }
- },
- onLoad(){
-
- },
- onShow(){
-
- },
- methods:{
- customBack(){
- this.$u.route({
- // type:'switchTab',
- url: 'pages/index/index'
- });
- },
- openPage(path) {
- // console.log('path',path);
- this.$u.route({
- url: path
- });
- },
- onPrintFeed(){
- //#ifdef APP-PLUS
- device.printFeed(10);
- //#endif
- //#ifdef H5
- uni.showToast({
- title: '非APP环境',
- duration: 2000
- });
- //#endif
- },
- onLoginOut(){
- uni.showModal({
- title: '温馨提示',
- content: '是否确认退出?',
- success: (res) => {
- if (res.confirm) {
- this.$u.api.loginOut({})
- .then(res=>{
- uni.showToast({
- title: '退出成功',
- duration: 2000
- });
- uni.redirectTo({
- url:'../login/login'
- });
- }).catch(err=>{
- });
- } else if (res.cancel) {
-
- }
-
- }
- })
-
- }
-
- }
- }
- </script>
- <style lang="scss" scoped>
- @import './setting.scss'
- </style>
|