cshenfu
2023-05-18 6d2537a481b9426e37aeb57848ab30a6c29b6bfe
save openid
2个文件已修改
17 ■■■■■ 已修改文件
App.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/home.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -5,7 +5,8 @@
    } from 'vuex'
    import setting from "@/common/config";
    export default {
        onLoad(op) {
        created() {
            let code = ''
            let open_id2 = this.getURLParams()
            if(open_id2.indexOf("?") != -1){
@@ -15,7 +16,6 @@
                uni.setStorageSync('openid',code);
            }
            let st_open = uni.getStorageSync('openid')
            console.log("eeeeeeeee",st_open)
        },
        methods: {
            getURLParams() {
pages/index/home.vue
@@ -19,7 +19,7 @@
            <view class="header">
                <view class="title text-bold">功能特性</view>
            </view>
            <!-- <text>{{ user_data }}</text> -->
            <!-- <text>{{ shar_openid }}</text> -->
            <u-transition :show="true" mode="slide-up">
                <view class="grid">
                    <view class="item">
@@ -100,7 +100,8 @@
                showTab: false,
                tabIndex: 0,
                setting_data:'null',
                user_data:'null'
                user_data:'null',
                shar_openid:'null'
            }
        },
        computed: {
@@ -119,7 +120,11 @@
            
        },
        created() {
            let st_open = uni.getStorageSync('openid')
            this.shar_openid = st_open
            var url_local = location.href.split("#")[0]
            let open_id_data = this.$store.state.userInfo.openid
            var urlLink = "http://ai.shsening.com/gpth5/#/pages/index/home?openid="+open_id_data
            this.$request("/api/Member/wxH5ShareId",'POST',{
                url:url_local
            }).then((res) => {
@@ -145,7 +150,7 @@
                      wx.updateAppMessageShareData({
                        title: "ChatFox", // 分享标题
                        desc: "ChatFox", // 分享描述
                        link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
                        link: urlLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
                        imgUrl: "@/static/h5/download-app/ios.png", // 分享图标
                        success: function () {
                          // 设置成功
@@ -163,7 +168,7 @@
                      //分享到朋友圈
                      wx.updateTimelineShareData({
                       title: "ChatFox", // 分享标题
                       link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
                       link: urlLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
                       imgUrl: "@/static/h5/download-app/ios.png", // 分享图标
                        success: function () {
                          // 设置成功