{"version":3,"file":"/pc/goods/js/detailzb.js.map","sources":["/pc/goods/js/detailzb.js"],"sourcesContent":["/**\n * Created by qianzhiyuan on 2016/6/6.\n */\n define([\"pcbase\",\"ko\",\"bootstrap\",\"galert\",\"game\",\"goods/js/detail_data\",\"goods/js/detailzb_data\",\"dao\",\"strhelp\",\"boxer\",\"login\",\"dataAccess\",\"router\",\"qrcode\",\"api\",\"orderGoodsTypeConfig\",\"SuperSlide\",\"share\"],function (pcbase,ko,bootstrap,galert,game,detail_data,detailzb_data,dao,strhelp,boxer,login,dataAccess,router,qrcode,api,orderGoodsTypeConfig,SuperSlide,share){\n return pcbase.extend(function() {\n \"use strict\";\n //声明页面配置\n var my = this;\n var goodsType = orderGoodsTypeConfig.goodsType;\n this.init = function(){\n this.needLogin =false;\n this.pageSelector = \".page-goods-detailzb\";\n this.model = {\n pDetail:ko.observable(\"\"),//商品描述\n createTime:ko.observable(\"\"),//发布时间\n toastText:ko.observable(\"\"),//toast文字\n updateTime:ko.observable(\"\"),//更新时间\n availQty:ko.observable(\"\"),//库存\n showRealName:ko.observable('realName'),//控制实名浮层显示\n gameName:ko.observable(\"\"),//游戏名\n deliverMode:ko.observable(\"\"),//发货方式\n sBookId:ko.observable(\"\"),//担保交易新增\n gameID:ko.observable(\"\"),//担保交易新增\n inTradeTime:ko.observable(),//是否在交易时间\n btnInTradeTime:ko.observable(false),//是否禁用按钮\n tradeTime:ko.observable(\"\"),//交易时间\n selreason: ko.observable(\"\"),//选中原因\n reasonList: ko.observable([]),//下架原因列表\n area_id: ko.observable(\"\"),\n group_id: ko.observable(\"\"),\n receiveAreaList: ko.observable([]),\n hasCoupon: ko.observable(\"\"),\n yhprice: ko.observable(\"\"),\n btnbuy: ko.observable(\"\"),//判断是否有购买按钮\n pub_time_area: ko.observable(\"\"),\n pub_left_seconds: ko.observable(\"\"),\n bottom_area_operation: ko.observableArray([]),//操作按钮\n bottom_area_operation_h5: ko.observableArray([]),//操作按钮\n seller_credit_level: ko.observable(\"\"),\n seller_credit_level_h5: ko.observable(\"\"),\n seller_nickname: ko.observable(\"\"),\n timesBind:ko.observable(false),\n imageId: ko.observable(\"\"),\n page: ko.observable(1),\n jumpNum: ko.observable(''),\n s_book_id: ko.observable(''),\n sendPhone: ko.observable(''),\n arrayPush: ko.observable([]),\n loginUserId: ko.observable(''),\n comType: ko.observable(''),\n isShow: ko.observable(false),\n comment_id:ko.observable(''),\n detecomid:ko.observable(''),\n deletype:ko.observable(''),\n nick_name: ko.observable(''),\n is_area_trans:ko.observable(''),\n \n to_nick_name: ko.observable(''),\n contentHtml: ko.observable(''),\n good_type_name: ko.observable(''),\n gameId: ko.observable(''),\n areaId: ko.observable(''),\n groupId: ko.observable(''),\n gamename: ko.observable(''),\n imgUrl:ko.observable(''),\n totalPage: ko.observable(''),\n // favoriteFlag:ko.observable(true), //收藏\n is_favorite:ko.observable(\"\"), //收藏\n favorite_flag:ko.observable(\"\"), //新接口收藏\n user_b_uid:ko.observable(),\n seller_b_uid:ko.observable(), //卖家的uid\n checkflag:ko.observable(\"true\"), //卖家的uid\n nowIndex:ko.observable(\"\"),\n goods_title: ko.observable(''),\n p_name: ko.observable(''),\n goods_type : ko.observable('10'),\n game_id: ko.observable(''),\n game_name:ko.observable(''),\n goods_type_name:ko.observable(''),\n price:ko.observable(''),\n goods_sub_title:ko.observable(''),\n favorite_cnt:ko.observable(''),//收藏数\n view_cnt:ko.observable(''),//访问数\n state:ko.observable(''),//状态\n state_desc:ko.observable(''),//状态中文名\n p_offshelf_time:ko.observable(''),//下架时间\n goods_main_detail: ko.observableArray([]), //商品详情列表\n goods_more_detail: ko.observable(''), //更多商品详情\\\n image_list: ko.observableArray([]), //更多商品详情\n picList: ko.observableArray([]), //更多图片\n //commentList: ko.observableArray([{\"nick_name\":\"\",\"comment\":\"\",\"create_time\":\"\",\"comment_id\":\"\"}]), //商品详情列表\n commentList: ko.observableArray([]), //商品详情列表\n commentTotalSize:ko.observable(0),\n displayAcc : ko.observable(\"\"),\n book_id : ko.observable(\"\"), \n s_mid : ko.observable(\"\"),//卖家聊天id\n s_b_uid : ko.observable(\"\"),//卖家商品id\n hadNewUserCouponList: ko.observable(false),\n gameTenance:ko.observable(false),//游戏是否维护\n gameTenanceMemo:ko.observable(''),//游戏是否维护描述文字\n\n \n guaranteList:ko.observableArray([\n {\n text:\"推荐价格\",\n name:\"di\",\n key:\"is_best_proportion\",\n tips:\"推荐价格:推荐价格游戏币\"\n },\n {\n text:\"闪电发货\",\n name:\"kuai\",\n key:\"is_quick\",\n tips:\"闪电发货:秒发秒到\"\n },\n {\n text:\"区服互通\",\n name:\"tong\",\n key:\"is_area_trans\",\n tips:\"\"\n },\n {\n text:\"卖家包邮\",\n name:\"mian\",\n key:\"is_free_post\",\n tips:\"卖家包邮:邮寄的5%手续费由卖家承担\"\n },\n {\n text:\"无货赔付\",\n name:\"pei\",\n key:\"is_support_compensation\",\n tips:\"该类商品,若因卖家原因取消交易,将赔偿买家10元,并扣除卖家信用分。\"\n },\n {\n text:\"有保障服务\",\n name:\"support-guarantee\",\n key:\"is_accept_insurance\",\n tips:\"已购买保障服务
成交后若30天内卖家原因商品被回收、被找回、被封号,买家可申请理赔。\"\n },\n {\n text:\"无保障服务\",\n name:\"accept-guarantee\",\n key:\"is_support_insurance\",\n tips:\"可自主购买保障服务
购买服务后因卖家原因商品被回收、被找回、被封号,买家可申请理赔。\"\n }\n ]),\n isGuarante: ko.observable(\"\"),\n realList:ko.observableArray([]),\n isTong: ko.observable(true),\n popName: ko.observable(\"\"),\n tipsbox: ko.observable(\"\"),\n insureTime: ko.observable(30),\n equmentImg: ko.observable(\"\"),\n shareUrl: ko.observable(\"\"),//分享地址\n openJsIm: ko.observable(true), //开启寄售im\n item_type: ko.observable(\"\"),//道具类型\n item_type_name: ko.observable(\"\"),//道具类型名称\n itemTypeText4ptips: ko.observable(''),//道具类型ptips里文字\n showTips: function (data, e, types) { //商品列表标题鼠标hover浮层\n var el = $(e.currentTarget);\n var left = el.offset().left - el.parents(\".guarante\").offset().left -4;\n //var popover = el.parent().siblings('.popTips');\n var tips = '';\n if (types == 'tong') {\n var crossArea = el.attr(\"crossArea\");\n if (crossArea == 1) {\n var transregional_info = my.model.receiveAreaList();\n my.model.showArea(transregional_info, el);\n } else {\n my.model.getReceiveAreaList(el)\n }\n my.model.isTong(false);\n\n } else {\n my.model.popName(types);\n if (data.key ==\"is_accept_insurance\"){\n data.tips = data.tips.replace(/\\d+/g,my.model.insureTime());\n }\n my.model.tipsbox(data.tips);\n my.model.isTong(true);\n el.parent(\".bztype\").siblings(\".contips\").show().find(\".tipsbox .iconbg\").css({'left': left}).show();\n }\n },\n showTipsDb: function (data, e, types) { //商品列表标题鼠标hover浮层\n var el = $(e.currentTarget);\n var left = el.offset().left - el.parents(\".guarante\").offset().left - 126;\n var popover = el.find('.contips');\n if (data.key ==\"is_accept_insurance\"){\n data.tips = data.tips.replace(/\\d+/g,my.model.insureTime());\n }\n popover.find('.boxtext').html(data.tips);\n $(\".guarante .popover\").hide();\n popover.css({'left': left}).show();\n },\n hideTips:function(data,e){\n $(\".contips\").hide();\n },\n getGoodsList: function (gameId,goodType,areaId,groupId,keyword,refer,gameOs,operatorId,tradeMode) {\n return strhelp.getGoodsListUrl(gameId,goodType,areaId,groupId,keyword,refer,gameOs,operatorId,tradeMode);\n },\n getGoodsListByItemType: function (gameId,goodType,itemType,areaId,groupId,keyword,refer,gameOs,operatorId,tradeMode) {\n return strhelp.getGoodsListUrl(gameId,goodType,areaId,groupId,keyword,refer,gameOs,operatorId,tradeMode,null,null,itemType);\n },\n showArea:function(divHtmlTxt){\n var html = \"\";\n var el = $(\".guarante .bztype .tong\");\n var obj = JSON.parse(divHtmlTxt);\n var allLength = obj.length-1;\n var popName = my.model.popName();\n var left = el.offset().left - el.parents(\".guarante\").offset().left -4;\n var temp=[];\n $.each(obj,function(index, el) {\n temp.push(el.group_name);\n });\n html= temp.join('/');\n var contentHtml =\n \"
购买下列任意区服的商品都可在当前选择的区服中收到:
\"\n + html+\n \"