绿满眶商城微信小程序-uniapp
zxl
2025-08-04 a38827061b6679a39d719dee72904ffbe49bd8e8
登录用户名,以及隐藏专题,新闻页面调整样式
6个文件已修改
79 ■■■■ 已修改文件
pages.json 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cusbar/home/template/tpl.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/news/detail.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/passport/wechatMPLogin.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/product/home/template/tpl.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tabbar/home/template/tpl.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -2065,12 +2065,12 @@
    {
      "root": "pages/cusbar",
      "pages": [
        {
          "path": "special/special",
          "style": {
            "navigationBarTitleText": "专题"
          }
        },
        // {
        //   "path": "special/special",
        //   "style": {
        //     "navigationBarTitleText": "专题"
        //   }
        // },
        {
          "path": "cart/cartList",
          "style": {
pages/cusbar/home/template/tpl.js
@@ -3,11 +3,11 @@
    let val = item.url || item;
    //链接跳转到专题
    if (val && val.id && val.pageType == "special") {
        uni.navigateTo({
            url: `/pages/tabbar/special/special?id=${val.id}`,
        });
    }
    // if (val && val.id && val.pageType == "special") {
    //     uni.navigateTo({
    //         url: `/pages/tabbar/special/special?id=${val.id}`,
    //     });
    // }
    switch (val.___type || val.type) {
        case "goods":
            uni.navigateTo({
pages/news/detail.vue
@@ -20,7 +20,7 @@
      <scroll-view scroll-y class="content-wrapper">
        <rich-text 
          :nodes="formatContent(detailData.content)" 
          class="content"
          class="rich-content"
        ></rich-text>
      </scroll-view>
    </template>
@@ -121,6 +121,7 @@
  padding: 30rpx;
  min-height: 100vh;
  background-color: #f8f8f8;
}
.loading-container {
@@ -164,15 +165,7 @@
    }
  }
}
.content-wrapper {
  background-color: #fff;
  border-radius: 16rpx;
  padding: 30rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  height: calc(100vh - 300rpx);
  .content {
  .rich-content {
    font-size: 30rpx;
    line-height: 1.8;
    color: #333;
@@ -208,5 +201,12 @@
      margin: 20rpx 0;
    }
  }
.content-wrapper {
  background-color: #fff;
  border-radius: 16rpx;
  padding: 30rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  height: calc(100vh - 300rpx);
  box-sizing: border-box;
}
</style>
pages/passport/wechatMPLogin.vue
@@ -214,7 +214,7 @@
        }
            },
            //获取手机号授权
            getPhoneNumber(e) {
             getPhoneNumber(e) {
                
              let iv = e.detail.iv;
              let encryptedData = e.detail.encryptedData;
@@ -255,17 +255,22 @@
                  icon: "none",
                });
                //获取用户信息
                getUserInfo().then((user) => {
                  getUserInfo().then(async (user) => {
                    console.log(user)
                    const form ={
                        memberId:user.data.result.id,
                        nickName:this.nickName
                    }
                    updateMemberNickName(form).then(res =>{
                    let name = '';
                    await updateMemberNickName(form).then(res =>{
                        if(res.statusCode === 200){
                            name = res.data.data;
                        }
                    })
                     user.data.result.nickName = this.nickName
                     storage.setUserInfo(user.data.result);
                     storage.setHasLogin(true);
                    user.data.result.nickName = name
                    storage.setUserInfo(user.data.result);
                    storage.setHasLogin(true);
                 
                  uni.navigateBack({
                    delta: 1,
pages/product/home/template/tpl.js
@@ -3,11 +3,11 @@
    let val = item.url || item;
    //链接跳转到专题
    if (val && val.id && val.pageType == "special") {
        uni.navigateTo({
            url: `/pages/tabbar/special/special?id=${val.id}`,
        });
    }
    // if (val && val.id && val.pageType == "special") {
    //     uni.navigateTo({
    //         url: `/pages/tabbar/special/special?id=${val.id}`,
    //     });
    // }
    switch (val.___type || val.type) {
        case "goods":
            uni.navigateTo({
pages/tabbar/home/template/tpl.js
@@ -3,11 +3,11 @@
    let val = item.url || item;
    //链接跳转到专题
    if (val && val.id && val.pageType == "special") {
        uni.navigateTo({
            url: `/pages/tabbar/special/special?id=${val.id}`,
        });
    }
    // if (val && val.id && val.pageType == "special") {
    //     uni.navigateTo({
    //         url: `/pages/tabbar/special/special?id=${val.id}`,
    //     });
    // }
    switch (val.___type || val.type) {
        case "goods":
            uni.navigateTo({