| | |
| | | <!-- <u-card :title="title" > --> |
| | | <view class="" slot="body"> |
| | | <!-- <view v-for="(item,index) in tree" :key="item.id"> --> |
| | | <u-grid :col="3"> |
| | | <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.id"> |
| | | <u-icon name="coupon" :size="50"></u-icon> |
| | | <view class="grid-text">{{item.name}}</view> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | <u-grid :col="2"> |
| | | <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description,item.menuName)" v-for="(item) in tree" |
| | | :key="item.menuId"> |
| | | <u-icon :name="item.icon" custom-prefix="custom-icon" size="50" |
| | | color="#888888"></u-icon> |
| | | <view class="grid-text">{{item.menuName}}</view> |
| | | </u-grid-item> |
| | | </u-grid> |
| | | <!-- </view> --> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { config } from '../../common/config.js' |
| | | import { |
| | | config |
| | | } from '../../common/config.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | // title: 'æä½åè½' |
| | | datas: [], |
| | | tree: [], |
| | | version:"" |
| | | version: "" |
| | | } |
| | | }, |
| | | onShow() { |
| | | // uni.getSystemInfo({ |
| | | // success: (res) => { |
| | | // this.version = res.appWgtVersion; |
| | | // // console.log(res); |
| | | // //æ£æµå½åå¹³å°ï¼å¦ææ¯å®ååå¯å¨å®åæ´æ° |
| | | // if (res.platform == "android") { |
| | | // this.AndroidCheckUpdate(); |
| | | // } |
| | | // } |
| | | // }); |
| | | console.log(); |
| | | |
| | | uni.getSystemInfo({ |
| | | success: (res) => { |
| | | this.version = res.appWgtVersion; |
| | | // console.log(res); |
| | | //æ£æµå½åå¹³å°ï¼å¦ææ¯å®ååå¯å¨å®åæ´æ° |
| | | if (res.platform == "android") { |
| | | this.AndroidCheckUpdate(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | onLoad() { |
| | | this.getCurrentTree(); |
| | | }, |
| | | mounted() { |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | AndroidCheckUpdate: function() { |
| | | var _this = this; |
| | | uni.request({ |
| | | url: 'http://10.1.211.101:9004/api/PDA/GetPDAVersion?version=' + this.version, |
| | | url: this.$u.http.config.baseUrl+'/api/PDA/GetPDAVersion?version=' + this.version, |
| | | method: 'GET', |
| | | data: {}, |
| | | success: res => { |
| | | if (res.data.data) { |
| | | |
| | | |
| | | uni.showToast({ |
| | | title: 'ææ°ççæ¬åå¸ï¼æ£æµå°æ¨ç®å为Wifiè¿æ¥ï¼ç¨åºå·²å¯å¨èªå¨æ´æ°ãæ°çæ¬ä¸è½½å®æåå°èªå¨å¼¹åºå®è£
ç¨åºã', |
| | | mask: false, |
| | | duration: 5000, |
| | | icon: "none" |
| | | }); |
| | | var dtask = plus.downloader.createDownload("http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, |
| | | var dtask = plus.downloader.createDownload( |
| | | this.$u.http.config.baseUrl+"/api/PDA/DownLoadApp", {}, |
| | | function(d, status) { |
| | | // ä¸è½½å®æ |
| | | if (status == 200) { |
| | |
| | | complete: () => {} |
| | | }); |
| | | }, |
| | | getCurrentTree() { |
| | | this.$u.post('/api/Sys_Menu/getTreeMenu', {}).then(result => { |
| | | this.tree = result; |
| | | getCurrentTree(ParentId) { |
| | | this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + ParentId, {}).then(result => { |
| | | this.tree = result; |
| | | }) |
| | | }, |
| | | getTree(id, data, isRootId) { |
| | |
| | | // return true; |
| | | return this.datas.find(x => x.text == text); |
| | | }, |
| | | clickCoupon(url) { |
| | | clickCoupon(url, menuid, warehouseid, menuname) { |
| | | // console.log("clickCoupon") |
| | | if (this.hasLogin()) { |
| | | this.$u.route(url) |
| | | this.$u.route({ |
| | | url: url, |
| | | params: { |
| | | menuId: menuid, |
| | | warehouseId: warehouseid, |
| | | menuName: menuname |
| | | } |
| | | }) |
| | | } else { |
| | | this.$t.message.loading('ç»å½å¤±æè¯·éæ°ç»å½') |
| | | uni.reLaunch({ |
| | |
| | | margin-top: 4rpx; |
| | | color: $u-type-info; |
| | | } |
| | | </style> |
| | | </style> |