crmeb5.0修改会员价格展示条件

2023-11-16

#api
#components 组件目录
components\goodList\index.vue 商品展示组件
components\productWindow\index.vue 产品属性组件
components\shareRedPackets\index.vue 产品页分享组件
#config
#libs
#mixins
#pages
pages\goods\goods_list\index.vue 商品列表
pages\goods_details\index.vue 商品详情
pages\index\diy\components\goodList.vue 首页自定义组件
pages\index\diy\components\promotionList.vue 首页自定义组件
pages\index\diy\index.vue 首页自定义
pages\users\wechat_login\index.vue 微信小程序配置文件
#plugin
#static
#store
#utils
#androidPrivacy.json
#App.vue
#main.js
manifest.json
#package-lock.json
#pages.json
#uni.scss
#vue.config.js
---------------------------------------------------------
#components\goodList\index.vue 商品展示组件
一、修改<template>标签内的<view class='underline'>
1.把
                    <view class='underline'>
                        <view class='text'>
                            <view class='line1'>{ {item.store_name}}</view>
                            <view class='money font-color'>{ {$t(`¥`)}}<text class='num'>{ {item.price}}</text></view>
                            <view class='vip-money acea-row row-middle'
                                v-if="item.is_vip && item.vip_price && item.vip_price > 0">
                                { {$t(`¥`)}}{ {item.vip_price || 0}}
                                <image src='../../static/images/vip.png'></image><text class='num'>
                                { {$t(`已售`)}}{ {item.sales}}{ {$t(item.unit_name)}}</text>
                            </view>
                            <view class='vip-money acea-row row-middle' v-else><text class='num'>
                            { {$t(`已售`)}}{ {item.sales}}{ {$t(item.unit_name)}}</text></view>
                        </view>
                    </view>
2.改为
                    <view class='underline'>
                        <view class='text'>
                            <view class='line1'>{ {item.store_name}}</view>
                            <view class='money font-color' v-if="!is_money_level">{ {$t(`¥`)}}<text class='num'>{ {item.price}}</text></view>
                            <view class='money font-color' v-else>{ {$t(`¥`)}}<text class='num'>{ {item.vip_price || item.price}}</text></view>
                            <view class='vip-money acea-row row-middle'
                                v-if="false  && item.is_vip && item.vip_price && item.vip_price > 0">
                                { {$t(`¥`)}}{ {item.vip_price || 0}}
                                <image src='../../static/images/vip.png'></image><text class='num'>
                                { {$t(`已售`)}}{ {item.sales}}{ {$t(item.unit_name)}}</text>
                            </view>
                            <view class='vip-money acea-row row-middle' v-else><text class='num'>
                            { {$t(`已售`)}}{ {item.sales}}{ {$t(item.unit_name)}}</text></view>
                        </view>
                    </view>
二、修改<script>标签内的内容
1.在
import {
    mapGetters
} from "vuex";
2.后添加:
import {
    getUserInfo,
    userShare
} from "@/api/user.js";
3.把
export default {
        computed: mapGetters(['uid']),
        props: {
            status: {
                type: Number,
                default: 0,
            },
            bastList: {
                type: Array,
                default: function() {
                    return [];
                }
            }
        },
4.改为
export default {
    computed: mapGetters(['uid', 'isLogin']),
    created() {
        this.getUserInfo();
    },
    onShow() {
        this.getUserInfo();
    },
    watch: {
        bastList: {
            handler() {
                this.getUserInfo();
            },
            deep: true
        }
    },
    props: {
        status: {
            type: Number,
            default: 0,
        },
        bastList: {
            type: Array,
            default: function () {
                return [];
            }
        }
    },
5.把
        data() {
            return {

            };
        },
6.改为
    data() {
        return {
            uid: 0,
            is_money_level: 0
        };
    },
7.把
        methods: {
            goDetail(item) {
                goPage().then(res => {
                    goShopDetail(item, this.uid).then(res => {
                        uni.navigateTo({
                            url: `/pages/goods_details/index?id=${item.id}`
                        })
                    })
                })

            }

        }
    }
8.改为
    methods: {
        goDetail(item) {
            goPage().then(res => {
                goShopDetail(item, this.uid).then(res => {
                    uni.navigateTo({
                        url: `/pages/goods_details/index?id=${item.id}`
                    })
                })
            })

        },
        getUserInfo: function () {
            let that = this;
            if (!that.isLogin) {
                that.$set(that, "uid", 0);
                that.$set(that, "is_money_level", 0);
                return;
            }
            getUserInfo().then((res) => {
                that.$set(that, "uid", res.data.uid);
                that.$set(that, "is_money_level", res.data.is_money_level);
            }).catch(() => {
                that.$set(that, "uid", 0);
                that.$set(that, "is_money_level", 0);
            });
        },
    }
}
#components\productWindow\index.vue 产品属性组件
一、修改<template>标签内的<view class="money font-color">
1.把
<view class="money font-color">
                        <view class="acea-row row-middle">
                            { {$t(`¥`)}}<text class="num">{ { attr.productSelect.price }}</text>
                            <text class='vip-money'
                                v-if="is_vip>0 && attr.productSelect.vip_price">{ {$t(`¥`)}}{ {attr.productSelect.vip_price}}</text>
                            <view class="vipImg" v-if="is_vip>0 && attr.productSelect.vip_price">
                                <image src="../../static/images/svip.gif"></image>
                            </view>
                        </view>
                        <text class="stock" v-if='isShow && !type'>{ {$t(`库存`)}}: { { attr.productSelect.stock }}</text>
                        <text class='stock'
                            v-if="limitNum">{ {type ? $t(`库存`) : $t(`限量`)}}:{ {type ? attr.productSelect.quota : limitNum + unitName}}</text>
                    </view>
                </view>
2.改为
                    <view class="money font-color">
                

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

crmeb5.0修改会员价格展示条件 的相关文章

  • Notepad++ Regex + python脚本(替换中添加)

    我也遇到了这个人同样的问题 Notepad 正则表达式将数字相加 https stackoverflow com questions 20506990 notepad regular expression add up numbers 35
  • notepad++正则表达式如何从此列表中提取userId

    我有下面这个列表 originalscrape scrapeDate userId username full name is private follower count following count media count biogr
  • Notepad++ 不突出显示 HTML 文件中的 css [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 在 Notepad 中 HTML 文件中的 CSS 没有语法突出显示 可以启用吗 这个问题已在超级用户中得到回答不同语言语法突出显示 ht
  • 让 NppExec 了解 Notepad++ 中当前文件的路径(对于 Python 脚本)

    很长一段时间以来第一次使用 Windows 并使用了 notepad 并使用 nppexec 插件来运行 python 脚本 但是 我注意到 notepad 没有选择保存脚本的目录 例如 我将 script py 放在 我的文档 中 但是
  • 从 C# 应用程序打开 txt 文件

    以下代码假设从我的 C 应用程序打开 CMD 并打开文件 text txt 我尝试将文件路径设置为环境变量 但是当记事本打开时 它会查找 file txt 而不是 text txt 知道为什么吗 System Diagnostics Pro
  • 如何删除单个换行符?

    我想删除文本中的单行符 但不删除双行符 我可以使用替换行 r n 如何删除单个换行符 EDIT 我还需要在每行之前添加空格 例如 如果原始文本是 line1 line2 line3 它必须转换为 line1 line2 line3 如果我明
  • Notepad++ 缓存文件位置

    在最新版本的 Notepad 上 当应用程序关闭时 重新启动应用程序时会保留未保存的文件 我认为这些文件缓存在临时文件中 该文件的位置是什么 谢谢 我自己注意到了 并在里面找到了文件backup文件夹 您可以检查它在哪里使用菜单 设置 gt
  • Notepad++ 可以配置为识别编译器错误消息并跳转到相应的位置吗?

    我正在一台没有 IDE 但使用 Notepad 的机器上构建一些相当大的代码 编译结果被重定向到一个文件 有时会有错误消息 满足定义良好的正则表达式 我想知道 NPP 是否有一个插件 它可以解析日志文件 识别错误 警告消息 并让我在相应的错
  • 内置 html 编码的 HTML 编辑器

    我现在使用 Notepad 似乎经常在这里建议进行基本的 html 和 css 编辑 唯一缺少的是粘贴到文本中的 HTML 编码方法 有没有办法在 Notepad 中执行此操作 或者我是否需要寻找其他编辑器来执行此操作 如果有什么建议的话
  • 如何在 Notepad++ 中多行“在文件中替换...”

    如果有免费的源代码编辑器记事本 http notepad plus sourceforge net uk about php具有 在文件中查找 功能 即无需在编辑器中打开文件 它是否也具有 在文件中替换 功能 Notepad 是基于Note
  • 在 Notepad++ 中格式化代码

    Notepad 中是否有用于格式化代码的键盘快捷键 我主要处理 HTML CSS 和 Python 代码 例如 To
  • Mercurial 和 Notepad++ 集成

    Notepad 是否有插件可以与 Mercurial 和 TortoiseHg 集成 如果将以下内容添加到我们的配置文件中 您可以使用 Notepad 打开文件 tortoisehg editor
  • Notepad++:块注释不起作用

    I am running Notepad 5 8 5 on Windows 7 editing Perl programs I would like to comment out a block of text lines and late
  • 如何将 Notepad++ 配置为使用空格而不是制表符?

    Notepad 不断插入制表符 这后来弄乱了我的代码 这种情况不仅发生在我按下 Tab 键时 其他时候也会发生 我希望它使用 4 个空格而不是制表符 如何让 Notepad 插入空格而不是制表符 前往优先菜单下的菜单命令Settings 然
  • 在 Windows 记事本的 Python 中创建 UTF-16 换行符

    在 Ubuntu 中运行的 Python 2 7 中 这段代码 f open testfile txt w f write Line one encode utf 16 f write u r n encode utf 16 f write
  • 如何删除 Notepad++ 中的特定行?

    我正在清理一些代码文件 C 并想要删除这些区域 我想删除所有包含字符串 region 的行 这只是一个例子 我可以想到更多的用途 但这可能吗 记事本 v6 5 Search菜单 gt Find gt Mark选项卡 gt 查找内容 您的搜索
  • Notepad++ 将鼠标悬停在链接或颜色上进行预览?

    我想知道是否有一个选择或plugin 这使我们能够悬停预览要么是CSS颜色 or image 像这样 而且如果你将鼠标悬停在 img src 上 预览图片 尝试 Notepad 快速颜色选择器 双击十六进制颜色 会弹出一个颜色选择器以及预览
  • Notepad++ 在每行添加数字

    我在文本文件中有以下数据 p 1 p 1 p 1 p 1 等等 我在 Notepad 中打开该文件 我该如何将其更改为 p 1 p 2 p 3 p 4 etc You can use the Column Editor mode First
  • 复制带有格式的 Notepad++ 文本?

    我正在使用 Notepad 来编写代码 如何复制 Notepad 中的代码及其格式以粘贴到 Microsoft Word 中 即语法突出显示等 这是当您选择要复制为 html 的文本时来自 notepad 的图像 and how the f
  • 有没有人有 Ruby 和 Rake 的 Notepad++ 函数列表插件的解析规则

    我使用 Notepad 编辑 rake 文件 并且希望能够使用函数列表插件 我无法在线找到任何解析规则 并且 语言解析规则 对话框没有非常清晰的记录 我正在将方法解析到以下列表中 但还想显示任务 Function Begin t def t

随机推荐