package com.zj365.dc.adapter.shop

import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ruffian.library.widget.RImageView
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.common.util.SpannableUtils
import com.xty.network.model.GoodsRecordsBean
import com.zj365.dc.R

class ShopGoodsTwoAdapter : BaseAdapter<GoodsRecordsBean.GoodsBean>(R.layout.item_goods_list_two_style) {
    override fun convert(holder: BaseViewHolder, item: GoodsRecordsBean.GoodsBean) {
        holder.getView<RImageView>(R.id.img_goods).setImage(context,item.pic)
        holder.setText(R.id.tv_goods_name,item.prodName)
        holder.setText(R.id.tv_price,"¥ ${item.price}")
        SpannableUtils.setMoney(holder.getView<TextView>(R.id.tv_line_price),item.oriPrice)


    }
}