无标题文章

2019-01-28  本文已影响0人  深度_1175

```

module.exports = {

    code: {

        /*

        <!-- myplugin -->

        <view wx:if="{{myplugin.status != 0 && myplugin.isagent != 0 && myplugin.level_num != 0}}" class="fui-cell myplugin">

          <view wx:if="{{myplugin.level_num >= 1 }}">一级返¥{{myplugin.cooked_fanli_1 }}</view>

          <view wx:if="{{myplugin.level_num >= 2 }}">二级返¥{{myplugin.cooked_fanli_2 }}</view>

          <view wx:if="{{myplugin.level_num == 3 }}">三级返¥{{myplugin.cooked_fanli_3 }}</view>

        </view>

        <!-- myplugin -->

        */

        /*

            .myplugin {

            margin-bottom: 15rpx;

            font-size: 30rpx;

            }

            .myplugin>view:not(:first-child) {

            margin-left: 10rpx;

            }

            .myplugin>view {

            background-color: #fbed4c;

            border-radius: 10rpx;

            padding: 5rpx 18rpx 5rpx 18rpx;

            box-shadow: 2rpx 2rpx 0rpx #ccc;

            }

        */

        /*

                        function calcmyplugin() {

                            let myplugin = {}

                            if (t.goods.my_getcomlevelnum['hascommission'] == 0) {

                                myplugin = {

                                    level_num: t.goods.my_getcomlevelnum['level'] || 0,

                                    level_1_per: t.goods.my_getcomlevelnum['commission1'] || 0,

                                    level_2_per: t.goods.my_getcomlevelnum['commission2'] || 0,

                                    level_3_per: t.goods.my_getcomlevelnum['commission3'] || 0,

                                    isagent: t.goods.my_getuserinfo['isagent'] || 0,

                                    status: t.goods.my_getuserinfo['status'] || 0,

                                    minprice: t.goods.minprice || 0

                                }

                            } else {

                                console.log('11',typeof t.goods.my_getcomlevelnum['commission1_rate'])

                                myplugin = {

                                    //level_num: t.goods.my_getcomlevelnum['level'] || 0,

                                    level_1_per: t.goods.my_getcomlevelnum['commission1_rate'] || 0,

                                    level_2_per: t.goods.my_getcomlevelnum['commission2_rate'] || 0,

                                    level_3_per: t.goods.my_getcomlevelnum['commission3_rate'] || 0,

                                    isagent: t.goods.my_getuserinfo['isagent'] || 0,

                                    status: t.goods.my_getuserinfo['status'] || 0,

                                    minprice: t.goods.minprice || 0

                                }

                                if (myplugin.level_1_per != 0) {

                                    myplugin.level_num = 1

                                }

                                if (myplugin.level_2_per != 0) {

                                    myplugin.level_num = 2

                                }

                                if (myplugin.level_3_per != 0) {

                                    myplugin.level_num = 3

                                }

                            }

                            if (myplugin.level_1_per != 0) {

                                myplugin.cooked_fanli_1 = (myplugin.minprice * (myplugin.level_1_per / 100));

                                myplugin.cooked_fanli_1 = Math.round(myplugin.cooked_fanli_1 * 100) / 100;

                            }

                            if (myplugin.level_2_per != 0) {

                                myplugin.cooked_fanli_2 = (myplugin.minprice * (myplugin.level_2_per / 100));

                                myplugin.cooked_fanli_2 = Math.round(myplugin.cooked_fanli_2 * 100) / 100;

                            }

                            if (myplugin.level_3_per != 0) {

                                myplugin.cooked_fanli_3 = (myplugin.minprice * (myplugin.level_3_per / 100));

                                myplugin.cooked_fanli_3 = Math.round(myplugin.cooked_fanli_3 * 100) / 100;

                            }

                            return myplugin

                        }

                        e.setData({

                            myplugin: calcmyplugin()

                        });

        */

    },

    // my_getcomlevelnum

    // my_getuserinfo

    // #FBED4C

    //tpl_goods.wxml 首页商品

    positions: {

        getGoodsDetail: '/addons/ewei_shopv2/plugin/app/core/mobile/goods.php::getDetail'

    },

    tables: {

        ims_ewei_shop_goods: '商品表',//以及商品分销金额

        /*

        hascommission 0,1 //独立分销

        commission1_rate

        commission2_rate

        commission3_rate

        */

        ims_ewei_shop_goods_param: '商品的参数表',

        ims_ewei_shop_perm_log: '操作日志',

        '分销': '/addons/ewei_shopv2/plugin/commission/core/web',

        '分销默认设置': 'ims_ewei_shop_sysset',

        ewei_shop_member: {

            //是否

            "isagent": 0,

            //审核

            "status": 0

        },

        'commission.set.edit': '分销设置',

        'commission.level.edit': '分销等级设置',

    },

    data: {

        /*        Array

                (

                    [commission] => Array

                        (

                            [level] => 3

                            [selfbuy] => 0

                            [cansee] => 0

                            [seetitle] =>

                            [become_child] => 0

                            [hideicode] => 0

                            [become] => 0

                            [become_ordercount] =>

                            [become_moneycount] =>

                            [become_check] => 0

                            [become_order] => 0

                            [open_protocol] => 0

                            [become_reg] => 1

                            [no_commission_url] =>

                            [withdraw] => 1

                            [commissiontype] => 0

                            [withdrawcharge] =>

                            [withdrawbegin] => 0

                            [withdrawend] => 0

                            [settledays] =>

                            [levelurl] =>

                            [leveltype] => 0

                            [qrcodeshare] => 0

                            [codeShare] => 1

                            [openorderdetail] => 0

                            [openorderbuyer] => 0

                            [closed_qrcode] => 0

                            [qrcode] => 0

                            [qrcode_title] =>

                            [qrcode_content] =>

                            [qrcode_remark] =>

                            [register_bottom] => 0

                            [register_bottom_title1] =>

                            [register_bottom_content1] =>

                            [register_bottom_title2] =>

                            [register_bottom_content2] =>

                            [register_bottom_title3] =>

                            [register_bottom_content3] =>

                            [register_bottom_remark] =>

                            [register_bottom_content] =>

                            [closemyshop] => 0

                            [select_goods] => 0

                            [style] => default

                            [regbg] =>

                            [applytitle] =>

                            [applycontent] =>

                            [cashcredit] => 0

                            [cashweixin] => 0

                            [cashother] => 0

                            [cashalipay] => 0

                            [cashcard] => 0

                            [become_goodsid] => 0

                            [texts] => Array

                                (

                                    [agent] => 分销商

                                    [shop] => 小店

                                    [myshop] => 我的小店

                                    [center] => 分销中心

                                    [become] => 成为分销商

                                    [withdraw] => 提现

                                    [commission] => 佣金

                                    [commission1] => 分销佣金

                                    [commission_total] => 累计佣金

                                    [commission_ok] => 可提现佣金

                                    [commission_apply] => 已申请佣金

                                    [commission_check] => 待打款佣金

                                    [commission_lock] => 未结算佣金

                                    [commission_wait] => 待收货佣金

                                    [commission_fail] => 无效佣金

                                    [commission_pay] => 成功提现佣金

                                    [commission_charge] => 扣除提现手续费

                                    [commission_detail] => 佣金明细

                                    [order] => 分销订单

                                    [down] => 下线

                                    [mydown] => 我的下线

                                    [c1] => 一级

                                    [c2] => 二级

                                    [c3] => 三级

                                    [yuan] => 元

                                    [icode] => 邀请码

                                )

                            [levelname] => 默认等级

                            [commission1] => 10

                            [commission2] => 5

                            [commission3] => 3

                        )

                ) */

    }

}

/*

    Array

(

    [diypage] => Array

        (

            [page] => Array

                (

                    [type] => 2

                    [title] => 请输入页面标题

                    [name] => 未命名页面

                    [desc] =>

                    [icon] =>

                    [background] => #f3f3f3

                    [titlebarbg] => #ffffff

                    [titlebarcolor] => #000000

                )

            [items] => Array

                (

                    [M1506332563879] => Array

                        (

                            [params] => Array

                                (

                                    [placeholder] => 请输入关键字进行搜索

                                )

                            [style] => Array

                                (

                                    [inputbackground] => #ffffff

                                    [background] => #f1f1f2

                                    [iconcolor] => #b4b4b4

                                    [color] => #999999

                                    [paddingtop] => 20

                                    [paddingleft] => 20

                                    [textalign] => left

                                    [searchstyle] =>

                                )

                            [id] => search

                        )

                    [M1506332568231] => Array

                        (

                            [style] => Array

                                (

                                    [dotstyle] => round

                                    [dotalign] => center

                                    [background] => #ffffff

                                    [opacity] => 0.8

                                )

                            [data] => Array

                                (

                                    [0] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/banner-1.jpg

                                            [linkurl] =>

                                        )

                                    [1] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/banner-2.jpg

                                            [linkurl] =>

                                        )

                                )

                            [id] => banner

                        )

                    [M1506332575975] => Array

                        (

                            [params] => Array

                                (

                                    [iconurl] => yYOURNAME/addons/ewei_shopv2/static/images/hotdot.jpg

                                    [noticedata] => 0

                                    [speed] => 4

                                    [noticenum] => 5

                                )

                            [style] => Array

                                (

                                    [background] => #ffffff

                                    [iconcolor] => #fd5454

                                    [color] => #666666

                                    [bordercolor] => #e2e2e2

                                )

                            [data] => Array

                                (

                                )

                            [id] => notice

                        )

                    [M1506332584255] => Array

                        (

                            [style] => Array

                                (

                                    [navstyle] =>

                                    [background] => #ffffff

                                    [rownum] => 4

                                    [showtype] => 0

                                    [pagenum] => 8

                                    [showdot] => 1

                                )

                            [data] => Array

                                (

                                    [0] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-1.png

                                            [linkurl] =>

                                            [text] => 按钮文字1

                                            [color] => #666666

                                        )

                                    [1] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-2.png

                                            [linkurl] =>

                                            [text] => 按钮文字2

                                            [color] => #666666

                                        )

                                    [2] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-3.png

                                            [linkurl] =>

                                            [text] => 按钮文字3

                                            [color] => #666666

                                        )

                                    [3] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-4.png

                                            [linkurl] =>

                                            [text] => 按钮文字4

                                            [color] => #666666

                                        )

                                )

                            [id] => menu

                        )

                    [M1506332586927] => Array

                        (

                            [style] => Array

                                (

                                    [navstyle] =>

                                    [background] => #ffffff

                                    [rownum] => 4

                                    [showtype] => 0

                                    [pagenum] => 8

                                    [showdot] => 1

                                )

                            [data] => Array

                                (

                                    [0] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-1.png

                                            [linkurl] =>

                                            [text] => 按钮文字1

                                            [color] => #666666

                                        )

                                    [1] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-2.png

                                            [linkurl] =>

                                            [text] => 按钮文字2

                                            [color] => #666666

                                        )

                                    [2] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-3.png

                                            [linkurl] =>

                                            [text] => 按钮文字3

                                            [color] => #666666

                                        )

                                    [3] => Array

                                        (

                                            [imgurl] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/icon-4.png

                                            [linkurl] =>

                                            [text] => 按钮文字4

                                            [color] => #666666

                                        )

                                )

                            [id] => menu

                        )

                    [M1506332594040] => Array

                        (

                            [params] => Array

                                (

                                    [showtitle] => 1

                                    [showprice] => 1

                                    [goodsdata] => 0

                                    [cateid] =>

                                    [catename] =>

                                    [groupid] =>

                                    [groupname] =>

                                    [goodssort] => 0

                                    [goodsscroll] => 0

                                    [goodsnum] => 6

                                    [showicon] => 1

                                    [iconposition] => left top

                                    [productprice] => 1

                                    [showproductprice] => 0

                                    [showsales] => 0

                                    [productpricetext] => 原价

                                    [salestext] => 销量

                                    [productpriceline] => 0

                                    [saleout] => 0

                                )

                            [style] => Array

                                (

                                    [background] => #f3f3f3

                                    [liststyle] => block

                                    [buystyle] => buybtn-1

                                    [goodsicon] => 推荐

                                    [iconstyle] => triangle

                                    [pricecolor] => #ff5555

                                    [productpricecolor] => #999999

                                    [iconpaddingtop] => 0

                                    [iconpaddingleft] => 0

                                    [buybtncolor] => #ff5555

                                    [iconzoom] => 100

                                    [titlecolor] => #000000

                                    [tagbackground] => #fe5455

                                    [salescolor] => #999999

                                )

                            [data] => Array

                                (

                                    [0] => Array

                                        (

                                            [gid] => 1

                                            [title] => 得力中性笔0.5mm签字笔碳素笔12支学生用文具用品黑色水笔蓝黑笔办公签名笔水性笔红笔考试笔黑笔批发笔包邮

                                            [subtitle] =>

                                            [price] => 232.20

                                            [thumb] => yYOURNAME/attachment/images/1/2019/01/i359GOm09LJOME0K9ZM30Gjz9C7GlQoo.jpg

                                            [total] => 9

                                            [productprice] => 0.00

                                            [ctype] => 1

                                            [sales] => 0

                                            [video] =>

                                            [seecommission] => 153.25

                                            [cansee] => 0

                                            [seetitle] =>

                                            [bargain] => 0

                                        )

                                    [1] => Array

                                        (

                                            [thumb] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/goods-2.jpg

                                            [price] => 20.00

                                            [productprice] => 99.00

                                            [title] => 这里是商品标题

                                            [sales] => 0

                                            [gid] =>

                                            [ctype] => 1

                                        )

                                    [2] => Array

                                        (

                                            [thumb] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/goods-3.jpg

                                            [price] => 20.00

                                            [productprice] => 99.00

                                            [sales] => 0

                                            [title] => 这里是商品标题

                                            [gid] =>

                                            [ctype] => 0

                                        )

                                    [3] => Array

                                        (

                                            [thumb] => yYOURNAME/addons/ewei_shopv2/plugin/app/static/images/default/goods-4.jpg

                                            [price] => 20.00

                                            [productprice] => 99.00

                                            [sales] => 0

                                            [title] => 这里是商品标题

                                            [gid] =>

                                            [ctype] => 0

                                        )

                                )

                            [id] => goods

                        )

                )

        )

    [startadv] => Array

        (

        )

    [customer] => 0

    [phone] => 0

)

*/

```

上一篇下一篇

猜你喜欢

热点阅读