Commit 40d690ea by 张卓

智能表单通过分享进入带token

parent 1ec343aa
......@@ -5586,6 +5586,11 @@
}
}
},
"mayi-front-tools": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.0.tgz",
"integrity": "sha512-Rva5tM2lSmbX6pb+fmu7FA60kJ/tKtDdTp5Tpj9B/+4Rtk9psuZ7zZk20Nk19mF6u/lZYJHrvdHr2yhKQWWFqQ=="
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
......
......@@ -26,6 +26,7 @@
},
"dependencies": {
"mayi-analytics": "^1.1.14",
"mayi-front-tools": "^1.0.0",
"mpvue": "^2.0.0",
"mpvue-wxparse": "^0.6.5",
"vuex": "^3.0.1"
......
......@@ -13,6 +13,10 @@
</template>
<script>
let forUrlAddKey;
if(process.browser) {
forUrlAddKey = require("mayi-front-tools/forUrlAddKey").default
}
import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
export default {
data(){
......@@ -24,8 +28,26 @@ export default {
}
},
onLoad(options){
console.log(decodeURIComponent(options.link),'地址')
console.log(decodeURIComponent(options.link),'地址',forUrlAddKey(decodeURIComponent(options.link),{token: wx.getStorageSync("sessionid"),jwt: 1}))
if(options.login != '1') {
this.link = decodeURIComponent(options.link)
}else {
if(wx.getStorageSync("sessionid")) {
this.link = forUrlAddKey(
decodeURIComponent(options.link),
{
token: wx.getStorageSync("sessionid"),
jwt: 1
}
)
}else {
let query = {
sence: 'sso'
}
this.$router.push({ name: "login-accountLogin", query });
}
}
},
async onShareAppMessage(res) {
let url = ''
......@@ -77,7 +99,9 @@ export default {
let len = res.target.data.length - 1;
console.log(res, "h5消息", res.target.data[len]);
this.shareShopName = res.target.data[len].shareShopName || "";
if(res.target.data[len].shareLogoUrl) {
this.shareLogoUrl = DFSImg(res.target.data[len].shareLogoUrl, 500, 400);
}
this.newWindowHref = res.target.data[len].shareImgUrl;// + '&fromVisitorOpenId=' + wx.getStorageSync("openid")
console.log("分享信息:", this.shareLogoUrl, this.shareShopName,1111111,res);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment