12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- 地图
- </view>
- <view class="two">
- 代付
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- user: {},
- info: {}
- };
- },
- onLoad: function(e) {
- const that = this;
- that.$set(that, `id`, e.id || '6343b53f21b24c75ad8dbf7a');
- that.watchLogin()
- },
- onShow: function() {},
- methods: {
- watchLogin() {
- const that = this;
- uni.getStorage({
- key: 'token',
- success: function(res) {
- let user = that.$jwt(res.data);
- if (user) that.$set(that, `user`, user);
- that.searchInfo();
- }
- })
- },
- async searchInfo() {
- const that = this;
- if (that.id) {
- let res = await that.$api(`/orderDetail/${that.id}`, 'GET')
- if (res.errcode == '0') {
- that.$set(that, `info`, res.data);
- } else {
- uni.showToast({
- title: res.errmsg,
- icon: 'none'
- })
- }
- }
- }
- }
- }
- </script>
- <style lang="scss">
- </style>
|