111
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
stringIsNotEmpty
|
||||
} from '../../common/empty'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -13,10 +16,24 @@
|
||||
contentdown: "获取信息失败,点击重试",
|
||||
contentrefresh: "获取信息中,请稍后",
|
||||
contentnomore: "没有更多数据了"
|
||||
}
|
||||
},
|
||||
shareUrl: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
|
||||
if (options != undefined && options.data != undefined) {
|
||||
let shareData;
|
||||
try {
|
||||
// 跳转携带数据
|
||||
shareData = JSON.parse(options.data)
|
||||
} catch (e) {
|
||||
shareData = JSON.parse(decodeURIComponent(options.data))
|
||||
}
|
||||
if (this.stringIsNotEmpty(shareData.url))
|
||||
this.shareUrl = shareData.url
|
||||
}
|
||||
|
||||
this.getWxCode()
|
||||
},
|
||||
methods: {
|
||||
@@ -60,13 +77,19 @@
|
||||
// 成功后跳转主页
|
||||
getApp().globalData.sid = res.data.data.sid
|
||||
getApp().globalData.token = res.data.data.token
|
||||
uni.setStorageSync("satoken",res.data.data.token)
|
||||
uni.setStorageSync("satoken", res.data.data.token)
|
||||
console.log("人员sid", res.data.data.sid);
|
||||
console.log("token", res.data.data.token);
|
||||
if (_this.stringIsNotEmpty(_this.shareUrl)) {
|
||||
uni.reLaunch({
|
||||
url: _this.shareUrl
|
||||
});
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/pickUpCard'
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_this.status = 'more'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user