| 123456789101112131415161718192021222324252627282930313233343536 |
- /*
- * 全局注入器
- */
- let page = {
- data() {
- return {
-
- }
- },
- methods: {
-
- },
- onLoad(options) {
- let userId=uni.getStorageSync("userId")
- console.log(userId,'我是userid===============>');
- if (!this.$u.test.isEmpty(userId)) {
- let link=window.location.href
- if (link.indexOf("?")!=-1) {
- link=link+"&agenterId="+userId
- }else{
- link=link+"?agenterId="+userId
- }
- let obj={
- link,
- title:"",
- desc:link
- }
- this.$shareConfig(obj,this)
- }
- if (!this.$u.test.isEmpty(options.agenterId)) {
- uni.setStorageSync("agenterId",options.agenterId)
- }
- }
- }
- export default page
|