1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view>
-
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- getstationCode:null,
- }
- },
- mounted() {
- this.getPamars()
- },
- onLoad(options) {
- if(options.stationCode){
- this.getstationCode=options.stationCode
- }
- if((decodeURIComponent(options.q)).split("=")[1]){
- this.getstationCode = (decodeURIComponent(options.q)).split("=")[1]
- }
- },
- methods: {
- getPamars(){
- if(this.$storage.getJson("token")){
- this.$http.getStationExchange({
- stationCode: this.getstationCode
- }).then(res => {
- if (res.code === 0 && res.data) {
- uni.redirectTo({
- url: '/pages/powerExchange/index?stationCode=' +this.getstationCode + '&exchangeNo=' + res.data
- })
- } else {
- uni.navigateTo({
- url: '/pages/public/404?error=' + res.msg
- })
- }
- })
- }else{
- uni.navigateTo({
- url: '/pages/public/login?topage='+this.getstationCode,
- });
- }
- }
- }
- }
- </script>
- <style>
- </style>
|