{"version":3,"file":"/pc/goods/js/detail_cs.js.map","sources":["/pc/goods/js/detail_cs.js"],"sourcesContent":["/*\n * @Date: 2023-03-15 10:26:45\n * @Author: caixiaohua@gmm01.com\n * @LastEditors: caixiaohua caixiaohua@shandagames.com\n * @LastEditTime: 2024-01-02 17:24:36\n * @FilePath: /gmm_pc/pc/goods/js/detail_cs.js\n */\n/**\n * Created by qianzhiyuan on 2016/7/6.\n */\ndefine([\"pcbase\",\"ko\",\"bootstrap\",\"galert\",\"game\",\"goods/js/detail_data\",\"dao\",\"strhelp\",\"lightbox\",\"login\",\"router\",\"dataAccess\",\"pageInf\",\"qrcode\",\"api\",\"fullPage\"],function (pcbase,ko,bootstrap,galert,game,detail_data,dao,strhelp,lightbox,login,router,dataAccess,pageInf,qrcode,api,fullPage){\n return pcbase.extend(function() {\n \"use strict\";\n //声明页面配置\n var my = this;\n //判断元素是否进入视窗\n function isInViewPortOfOne (el) {\n // viewPortHeight 兼容所有浏览器写法\n const viewPortHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight \n const offsetTop = el.offsetTop\n const scrollTop = document.documentElement.scrollTop\n const top = offsetTop - scrollTop\n return top <= viewPortHeight - 500\n }\n function isInViewPortOfTwo (el) {\n // viewPortHeight 兼容所有浏览器写法\n const viewPortHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight \n const offsetTop = el.offsetTop\n const scrollTop = document.documentElement.scrollTop\n const top = offsetTop - scrollTop\n return top <= viewPortHeight\n }\n //节流\n var throttle = function(func, delay) {\n var prev = Date.now(); \n return function() { \n var context = this; \n var args = arguments; \n var now = Date.now(); \n if (now - prev >= delay) { \n func.apply(context, args); \n prev = Date.now(); \n } \n } \n } \n this.init = function(){\n this.needLogin =false;\n this.pageSelector = \".page-goods-detail-cs\";\n this.model = {\n roleInfoBg:ko.observable(''), \n commentBg:ko.observable(''), \n getSwipeNavList:ko.observable(true),//是否获取配置\n toastText: ko.observable(\"\"),\n resetImageList:ko.observableArray([]),//处理好的截图商品分类图片\n swipeNavList:ko.observableArray([]),//截图商品分类配置列表\n mouseScrollNum:ko.observable(0),//鼠标滚轮的坐标类型\n showRealName:ko.observable('realName'),//控制实名浮层显示\n snapshot: ko.observable(true),\n hasCoupon: ko.observable(\"\"),\n yhprice: ko.observable(\"\"),\n create_time: ko.observable(\"\"),\n btnbuy: ko.observable(\"\"),//判断是否有购买按钮\n suportType: ko.observable(\"\"),\n checkTypelist:ko.observableArray([]),\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 replyTxt:ko.observable(''),//回复内容\n myAvatar:ko.observable(),//我的头像\n detecomid:ko.observable(''),\n deletype:ko.observable(''),\n nick_name: ko.observable(''),\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 roleInfoImgList: ko.observableArray([]), //角色信息图片\n equipList: ko.observableArray([]), //装备图片\n skillList: ko.observableArray([]), //技能图片\n bagList: ko.observableArray([]), //背包图片\n monsterList: ko.observableArray([]), //怪物图片\n tabNameListAll: ko.observable([]), //所有标签名字数组\n activeIndex: ko.observable(0), //正在显示的index\n changeTabCarousel: ko.observable(true),\n sellerList: ko.observableArray([]), //卖家上传截图\n screenList: ko.observableArray([]), //客服截图\n haveScreenPic:ko.observable(false), //是否有客服截图\n screenName: ko.observable(), //客服截图显示带时间的名称\n sliderImgIndex: ko.observable([0,0,0,0]),\n imgNums: ko.observable(0), //图片数量\n needChangeTab: ko.observable([0]), //需要改变tabname的数字\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 showContactTips:ko.observable(false),\n s_mid : ko.observable(\"\"),//卖家聊天id\n s_b_uid : ko.observable(\"\"),//卖家商品id\n hadNewUserCouponList: ko.observable(false),\n showInsurance:ko.observable(true),//显示保险开关\n //insuranceTask begins\n isGuarante: ko.observable(\"\"),\n gameTenance:ko.observable(false),//游戏是否维护\n gameTenanceMemo:ko.observable(''),//游戏是否维护描述文字\n guaranteList:ko.observableArray([\n {\n text:\"有保障服务\",\n name:\"support-guarantee\",\n key:\"is_accept_insurance\",\n tips:\"该商品,卖家已购买保障服务。
保障服务是指交易安全服务、绿色通道服务、快速赔付服务。该保障服务由中国人保财险承保,成交后若30天内卖家原因商品被回收、被找回、被封号,买家可申请理赔。\"\n },\n \n {\n text:\"无保障服务\",\n name:\"accept-guarantee\",\n key:\"is_support_insurance\",\n tips:\"该商品,可自主购买保障服务。
保障服务是指交易安全服务、绿色通道服务、快速赔付服务。该保障服务由中国人保财险承保,在保障期限内卖家原因商品被回收、被找回、被封号,买家可申请理赔。\"\n },\n \n ]),\n realList:ko.observableArray([]),\n isTong: ko.observable(true),\n popName: ko.observable(\"\"),\n tipsbox: ko.observable(\"\"),\n insureTime: ko.observable(30),\n shLimitBuy: ko.observable(false),//收号商品限制购买,默认不限制\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 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 //insuranceTask ends\n // 节流函数\n throttle :function(fn, delay) {\n var timer = null;\n return function() {\n if (timer) return;\n timer = setTimeout(function(){\n fn.apply(this, arguments);\n timer = null;\n }, delay);\n }\n },\n queryCoupons: function(price){\n var self = this;\n // 显示加载提示符\n var goods_type = my.model.goods_type(); //服务端只处理 goods_type = 9 等参数\n var game_id = my.model.game_id();\n $.ajax({\n type: \"GET\",\n url: \"/gatew/frontconfigapi\",\n data: {\n \"method\": \"queryCoupons\",\n \"params\": JSON.stringify({\n \"amount\": Number(price),\n \"game_id\": game_id,\n \"goods_type\": goods_type,\n })\n },\n success: function(resp) {\n if (resp.return_code == 0 && resp.data && resp.data.available) {\n if(resp.data.available.length > 0){\n my.model.hasCoupon(true);\n var list = resp.data.available;\n my.model.getNewCouponList(list)\n list.sort(function (a,b) {\n return -(a.discount -b.discount)\n })\n my.model.yhprice(Number((my.model.price() - list[0].discount/100) > 0 ? (my.model.price() - list[0].discount/100) : 0).toFixed(2));\n\n }\n } else if (resp.return_code !== 0) {\n galert(resp.return_message);\n }\n },\n error:function(data){\n // 隐藏加载提示符\n console.log(data)\n }\n });\n },\n\n //获取商品保险开关\n getInsuranceSwitch:function(){\n var self = this;\n var params={\n method:\"GetVersion\",\n params:JSON.stringify({\n \"object_id\":'insurance_switch_cfg'\n })\n };\n $.ajax( \"/gate/frontconfigapi\",{\n data:params,\n success: function(response){\n var data = response.data;\n if(data.memo['game_id_'+my.model.gameId()]===1) {\n my.model.showInsurance(true)\n // console.log(my.model.showInsurance())\n }\n \n }\n });\n },\n //获取新人优惠券信息\n getNewCouponList: function(list){\n var self = this;\n var params={\n method:\"GetVersion\",\n params:JSON.stringify({\n \"object_id\":'new_users_coupon_config'\n })\n };\n\n $.ajax( \"/gate/frontconfigapi\",{\n data:params,\n success: function(response){\n var data = response.data;\n if (response.return_code === 0) {\n data = response.data.memo.new_user_coupons\n for(var i = 0; i < data.length; i++) {\n if(list) {\n for(var j = 0; j < list.length; j++) {\n if(list[j].catId == data[i].catId) {\n // if(true) {\n my.model.hadNewUserCouponList(true)\n break\n }\n }\n }else {\n if((data[i].gameAppIds == my.model.game_id() || data[i].gameAppIds == -1) && data[i].minamount/100 <= my.model.price()) {\n var itemTypesList = data[i].itemTypes.split(\",\")\n for(var k = 0; k < itemTypesList.length; k++) {\n if(itemTypesList[k] == my.model.goods_type()) {\n my.model.hadNewUserCouponList(true)\n break\n }\n }\n }\n if(my.model.hadNewUserCouponList()) {\n break\n }\n }\n }\n }\n }\n });\n },\n closeRealName: function(){\n my.model.showRealName('completeRealName');\n window.open('/pc/my/realName.html',\"_blank\");\n },\n //判断是否实名\n showRealNameConfirm: function(){\n //查询是否实名\n var query_params = {\n };\n $.ajax(api.realName.getStatus, {\n data: query_params,\n success: function (response) {\n if (response.return_code == 0) {\n if (response.data.realNameStatus == 0) {//未实名,弹提示浮层\n my.model.showRealName('realName');\n $('#modal-realname').modal();\n } else {\n my.model.contact();\n }\n } else {\n galert(response.return_message);\n }\n },\n error: function () {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n contact: function(){\n var self = this;\n var callbackAfterLogin = function(){ \n var supportCallback = function(){\n my.pageInf.gotoGchat('product',{\n book_id:my.model.book_id(),\n s_book_id:my.model.s_book_id(),\n title:my.model.goods_title(),\n picture_url:my.model.image_list()[0].url,\n amount:my.model.price(),\n matrix_name:my.model.goods_sub_title(),\n game_id:my.model.game_id(),\n b_mid:dataAccess.getCookie(\"userMid\"),\n s_mid:my.model.s_mid(),\n b_b_uid:dataAccess.getCookie(\"b_uid\"),\n s_b_uid:my.model.seller_b_uid(),\n goods_type:my.model.goods_type()\n });\n }\n var unsupportCallback = function(){\n $(\"#appdownload-contact\").modal(\"show\");\n }\n strhelp.checkIESupport(supportCallback,unsupportCallback);\n } \n login.checkLoginStatusWithShownLoginPage(callbackAfterLogin);\n },\n\n action:function(id,param){\n for (var i in my.actionConf){\n if (id === my.actionConf[i]['id']){\n my.actionConf[i]['action'](param);\n }\n }\n },\n\n bindBoxer:function(el,e){\n $(el).closest('.section-other').find('.boxer').lightbox();\n },\n infobindBoxer:function(el,e){\n var parentId = el[0].parentElement.id;\n $('#' + parentId + ' .boxer').lightbox();\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 \n //设置账号操作按钮\n setAccountBtn:function(state) {\n switch (state + '') {\n case '2':\n return[{id: \"edit\", name: \"编辑\", classname: \"goodedit\"},\n {id: \"update\",name: \"擦亮\",classname: \"icon-refresh\"},\n {id: \"off_shelf\", name: \"下架\", classname: \"icon-removed\"}];\n break;\n case '3':\n return[{id: \"on_shelf\", name: \"重新发布\",classname: \"onshelf\"}, \n {id: \"delete_product\", name: \"删除\",classname: \"delete_product\"}];\n break;\n case '4':\n case '7':\n return [];\n break;\n default:\n return [];\n break;\n }\n },\n\n getCsSwipeNav:function(detail){\n var url = \"/gate/frontconfigapi/GetVersion\"\n var game_id = my.model.game_id() || detail.game_id || detail.gameId || '';\n var query_params = {\n object_id: \"goods_screenShot_image_cfg\" + '_' + game_id,\n };\n $.ajax(url,{\n data: query_params,\n success: function(response) {\n var result = response.data.memo || [];\n my.model.swipeNavList(result);\n my.model.resetImageList([]);\n my.model.sliderImgIndex([]);\n var typeImgList = detail.image_list || [];\n var arr = [];\n var navigationText = [];\n var i = 0;\n my.model.swipeNavList().forEach(function(type,index){\n navigationText.push(type.text);\n if(type.key != \"role_info\"){ //角色信息不需要处理\n arr.push({id : type.key,list:[],bg:type.bg})\n my.model.sliderImgIndex()[i] = 0;\n i++;\n typeImgList.forEach(function(item,itemIndex){\n item = JSON.parse(item);\n if(item.id == type.key){//当前类等于配置中的类型\n var obj = {};\n item.list = item.list.map(function(val){ \n val = JSON.parse(val);\n val.small_url = strhelp.reSetImgageSizeUrl(val.small_url,730,510);//修改图片尺寸\n return val;\n })\n obj['id'] = item.id;\n obj['index'] = itemIndex;\n obj['list'] = item.list;\n arr.forEach(function(key,i){\n if(key.id == type.key) {\n arr[i] = Object.assign(arr[i],obj);\n }\n })\n }\n })\n }else{//处理角色信息和留言背景图\n my.model.roleInfoBg(type.bg); \n my.model.commentBg(type.bg_comment); \n }\n })\n my.model.resetImageList(arr);\n console.log(arr)\n navigationText.push(\"商品留言\");\n $('#fullpage').fullpage({\n navigation: true,\n navigationPosition: 'right',\n autoHeight: true,\n slideSelector:null,\n sectionSelector:\"#fullpage .section\",\n navigationText:navigationText\n });\n my.model.initSlider(result.length - 1); \n my.model.getSwipeNavList(false);\n }\n });\n },\n copyContent:function(data,text){\n var input = document.createElement('input');\n document.body.appendChild(input);\n input.setAttribute('value', text);\n input.select();\n if (document.execCommand('copy')) {\n document.execCommand('copy');\n my.model.toastText(\"复制成功!\");\n $(\"#toast\").show();\n setTimeout(function () { $(\"#toast\").hide() }, 2000)\n }\n document.body.removeChild(input);\n },\n gotoDetail:function(){\n var self = this;\n var bookId = my.model.book_id()\n var order_id = strhelp.urlParamName(\"order_id\")\n var goods_type = my.model.goods_type()\n // var url = '/gmminf/accountapi/goods/'\n var url = api.jsTrade.goodDetail.account\n var query_params = {\n method: \"GetGoodsStatus\",\n params: JSON.stringify({\n book_id: bookId,\n b_uid:dataAccess.getCookie('b_uid')\n })\n };\n\n if(order_id && (goods_type==10 || goods_type==12)){\n url = '/gatew/accountapi/order'\n query_params = {\n method: \"getOrderGoodsDetail\",\n params: JSON.stringify({\n book_id: bookId,\n order_id:order_id\n })\n }\n }\n\n $.ajax(url,{\n data: query_params,\n success: function(response){\n if(response.return_code ==0 ){\n detail_data.detail.parse(response,my.model);\n var otherList = [];\n response.data.image_list.forEach(function(imglist){\n imglist = JSON.parse(imglist);\n if (imglist.id == 'role_info'){\n imglist.list = imglist.list.map(function(item,itemIndex){ \n item = JSON.parse(item);\n item.small_url = strhelp.reSetImgageSizeUrl(item.small_url,700,434);//修改图片尺寸\n return item;\n })\n my.model.roleInfoImgList(imglist.list);\n }\n })\n if(my.model.getSwipeNavList()){\n my.model.getCsSwipeNav(response.data);\n }\n my.model.sellerList(response.data.image_list);\n my.model.seller_b_uid(response.data.b_uid);\n my.model.goods_type_name(my.conf.queryGoodsName(response.data.goods_type));\n\n var book_id = my.model.book_id();\n var game_id = strhelp.urlParamName(\"game_id\");\n var price = response.data.price;\n if( response.data.image_list.length> 0){\n var imgSrc = response.data.image_list[0].small_url;\n }\n\n var goodTitle = response.data.p_name;\n window.jiathis_config={\n siteNum:3,\n sm:\"weixin,cqq,tsina\",\n summary:\"\",\n title:goodTitle,\n shortUrl:false,\n hideMore:true\n }\n //my.model.goods_type(response.data.goods_type);\n\n if(typeof(bookId)!= \"undefined\" && bookId!=\"\" && typeof(game_id)!= \"undefined\" && game_id!=\"\" ){\n dao.saveGoodsHis(bookId,imgSrc,goodTitle,price,game_id);\n }\n my.model.getGameName(response.data.game_id);//取游戏名字\n\n var showContactTips = dataAccess.getCookie('showContactTips');\n if (showContactTips === \"0\"){\n my.model.showContactTips(false);\n } else {\n my.model.showContactTips(true);\n }\n router.getPageModule(\"common/js/yhqlist\",function(pageModel){\n var goods_type = my.model.goods_type();\n var game_id = response.data.game_id;\n pageModel.queryYhqList(game_id,goods_type,book_id);\n },1);\n\n if (login.hasLoggedIn()) {\n my.model.queryCoupons(response.data.price);\n }\n if (!login.hasLoggedIn()){\n my.model.getNewCouponList()\n }\n //insuranceTask begins\n var safeType = JSON.parse(response.data.safe_type_data);\n if (safeType.is_support_insurance == 0 && safeType.is_accept_insurance == 0) {\n safeType.is_support_insurance = 1; //如果is_support_insurance和is_accept_insurance都是0,就认为支持投保\n }\n if(safeType.is_support_insurance || safeType.is_accept_insurance){\n my.model.isGuarante(true)\n }\n var guaranteList = my.model.guaranteList();\n var templist = [];\n $.each(guaranteList,function(index,val){\n if(safeType[val.key]){\n templist.push(val)\n }\n })\n my.model.realList(templist);\n var nowTpyeClass = $($(\".guarante .bztype\").find(\"span\").eq(0)).attr(\"class\");\n my.model.popName(nowTpyeClass);\n var realList = my.model.realList();\n $.each(realList, function(index, val) {\n if (nowTpyeClass == 'tong') {\n var crossArea = $(\".guarante .bztype .tong\").attr(\"crossArea\");\n if (crossArea == 1) {\n var transregional_info = my.model.receiveAreaList();\n my.model.showArea(transregional_info);\n } else {\n my.model.getReceiveAreaList()\n }\n my.model.isTong(false);\n\n }else if(val.name == nowTpyeClass) {\n if (response.data.p_values && response.data.p_values.account_insurance_time){\n var time = response.data.p_values.account_insurance_time;\n time && my.model.insureTime(time);\n val.tips = val.tips.replace(/\\d+/g,time);\n }\n my.model.tipsbox(val.tips);\n my.model.isTong(true);\n }\n });\n //insuranceTask ends\n\n var book_id = response.data.book_id;\n var goods_type=response.data.goods_type;\n var game_id = response.data.game_id;\n var h5Url = \"http://www.gmmsj.com/h5/goods/detail/index.html?book_id=\"+book_id+\"&goods_type=\"+ goods_type +\"&game_id=\" + game_id + \"&source=pc\"+\"&from=buy\";\n $(my.pageSelector + ' .iconcode').qrcode(h5Url);\n\n router.getPageModule(\"common/js/search\",function(pageModel){\n pageModel.model.queryAdvert({'ad_position':'goods_detail_top','game_id':game_id, 'goods_type':goods_type});\n },1);\n\n my.model.bottom_area_operation_h5(my.model.setAccountBtn(response.data.state));\n my.model.getScreenShots(book_id,my.model.image_list());\n my.model.gameId(response.data.game_id);\n my.model.areaId(response.data.area_id);\n my.model.groupId(response.data.group_id);\n my.model.checkGameTenance();\n my.model.getInsuranceSwitch();\n //用户登录并且是账号的商品需要日志上报\n if(dataAccess.getCookie(\"gmmpc_loginstatus\") == 1 && (goods_type==10 || goods_type==12)){\n my.model.goodsReqLog(\n {\n book_id:book_id,\n goods_type:goods_type,\n game_id:my.model.gameId(),\n area_id:my.model.areaId(),\n group_id:my.model.groupId(),\n b_uid:my.login.getLoginUserId()\n }\n );\n }\n //是收号商品,查询是否是号商\n if (login.hasLoggedIn() && (my.model.loginUserId() != my.model.seller_b_uid()) && response.data.p_values && Number(response.data.p_values.merchant)){\n my.model.accountCheckCanBuy();\n }\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n //商品详情日志上报\n goodsReqLog:function(params){\n var url = \"/gatew/accountapi/goods/reqLog\";\n $.ajax(url, {\n data: params,\n success: function(response) {\n if(response.return_code ==0 ){\n }else{\n }\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n })\n },\n getScreenShots: function(book_id,imglist) { //请求分类图片\n var self = this;\n var param = {\n book_id: book_id\n }\n var nameList = [];\n var imgResult = [];\n var needCTab = my.model.needChangeTab();\n var order_id = strhelp.urlParamName(\"order_id\");\n var goods_type = my.model.goods_type();\n var url = '/gate/accounttradeapi/product/getScreenShots';\n if(order_id && typeof(order_id)!='undefined' && (goods_type==10 || goods_type==12)){\n url = '/gatew/accountapi/product/getOrderGoodsScreenShots';\n param.order_id = order_id\n }\n $.ajax(url, {\n data: param,\n success: function(response) {\n if(response.return_code ==0 ){\n var resData = response.data;\n var screen = '客服截图(截图时间' + resData.create_time+')';\n my.model.screenName(screen);\n nameList.push(screen);\n my.model.tabNameListAll(nameList.concat(['卖家上传']));\n var screenList = resData.images_list;\n screenList && (screenList = screenList.map(function(item,index){\n item.url = item.url.replace('gprofile.sdo.com', 'pics.sdoprofile.com');\n item.smallUrl = item.url.replace('gprofile.sdo.com', 'pics.sdoprofile.com');\n //如果是oss图片,替换缩略图为中间截取400*400的图\n if (item.smallUrl.indexOf(\"oss/image\") > -1){\n item.smallUrl = item.url.replace('oss/image','ossview/image/mfill');\n if (item.smallUrl.indexOf(\"_500_300\") > -1){ //如果图片地址已经是500*300的图,换成400*400\n item.smallUrl = item.smallUrl.replace(\"_500_300\",\"_400_400\");\n } else {\n var index = item.smallUrl.lastIndexOf(\".\"); //其他加上400*400尺寸截取\n if (index > 0){\n item.smallUrl = item.smallUrl.substring(0,index) + \"_400_400\" + item.smallUrl.substring(index);\n }\n }\n }\n return item;\n }));\n if(screenList && screenList.length>0){\n my.model.screenList(screenList);\n imgResult = screenList.concat(imglist);\n my.model.image_list(imgResult) ;\n my.model.haveScreenPic(true);\n needCTab.push(screenList.length);\n needCTab.push(imglist.length + screenList.length);\n my.model.needChangeTab(needCTab);\n my.model.imgNums(screenList.length + imglist.length);\n\n }else{\n my.model.haveScreenPic(false);\n }\n\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n })\n },\n\n\n\n changeTab: function(index) { //点击标签切换图片组\n my.model.activeIndex(index);\n my.model.changeTabCarousel(false);\n $('.page-group #page-goods-detail-carousel').carousel(my.model.needChangeTab()[index]);\n var index = my.model.needChangeTab()[index];\n //懒加载\n var curImg = $('#page-goods-detail-carousel').find('.item').eq(index).find('img');\n var curLink= $('#page-goods-detail-carousel').find('.item').eq(index).find('a.boxer');\n curImg.attr('src',curImg.attr('data-src'));\n curLink.attr('href',curImg.attr('data-src'));\n },\n\n\n\n //获取留言列表\n getCommont:function(currentPageNumber){\n var goods_type = my.model.goods_type();\n my.model.page(currentPageNumber);\n my.model.arrayPush([]);\n $(\".comment .editcont\").find(\".allselect\").attr(\"checked\",false);\n var self = this;\n var query_params={\n page: currentPageNumber,\n goods_type:goods_type,\n book_id:my.model.book_id(),\n sort_dir:2,\n limit:4\n //ticket:ticket\n };\n\n var params={\n method:\"GetGoodsCommentList\",\n params:JSON.stringify(query_params)\n };\n\n // $.ajax( \"/gmmweb/goodsgw/getGoodsCommentList\",{\n $.ajax( \"/api/consigntradeapi/goods\",{\n data: params,\n success: function(response){\n console.log(response);\n if(response.return_code ==0 ){\n detail_data.common.parse(response,my.model);\n\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n\n },\n getGameName:function(gameid){//查游戏名称\n var gameName = game.getGameByGameId(gameid)['game_name'];\n my.model.gamename(gameName);\n },\n\n\n //收藏按钮\n onCollect:function(){\n var self = this;\n var url=\"\";\n var is_favorite = my.model.favorite_flag();\n var book_id = my.model.book_id();\n var game_id = my.model.game_id();\n var goods_type = my.model.goods_type();\n var seller_b_uid = my.model.seller_b_uid();\n var loginUserId = my.login.getLoginUserId();\n if(is_favorite == \"1\"){\n url = \"/gatew/consigntradeapi/goods/deletefavorite\";\n }else if(is_favorite == \"0\"){\n // url = \"/gmmweb/MyGW/addFavorite\";\n url = \"/gatew/userapi/addFavorite\";\n }\n console.log(loginUserId);\n if(typeof (loginUserId) !=\"undefined\" && seller_b_uid == loginUserId){\n galert(\"卖家不能收藏自己的商品\");\n return;\n }\n var query_params={\n game_id:game_id,\n goods_type:goods_type,\n book_id:book_id\n };\n $.ajax({\n type : \"get\",\n url : url,\n data: query_params,\n dataType:\"json\",\n success: function(response){\n if(response.return_code == 0)\n {\n my.model.gotoDetail();\n //\n // if(is_favorite == \"1\"){\n // my.model.is_favorite(\"0\");\n // my.model.favorite_cnt(my.model.favorite_cnt()-1);\n // }else if(is_favorite == \"0\"){\n // my.model.is_favorite(\"1\");\n // my.model.favorite_cnt(my.model.favorite_cnt()+1);\n //\n // }\n }\n else\n {\n galert(response.return_message);\n }\n },\n error: function() {\n galert(\"您的网络不给力,请检查网络!\");\n },\n loginCallBack:function(){\n my.model.onCollect();\n }\n });\n\n },\n //发布留言\n btnPubMeg:function(){\n var self = this;\n var pubarea = '';\n pubarea = my.model.replyTxt() ? my.model.replyTxt() : $(my.pageSelector +\" .pubarea\").val();\n var book_id= my.model.book_id();\n var to_comment_id = my.model.comment_id();\n var nick_name = my.model.nick_name();\n var to_nick_name = my.model.to_nick_name();\n var comarea=\"\";\n if(pubarea==\"\"){\n galert(\"请输入留言的内容!\");\n return;\n }\n if(typeof(to_nick_name)!=\"undefined\" && to_nick_name!=\"\"){\n comarea =\"回复\" + \"【\" + nick_name +\"】\" +\": \" + pubarea;\n }else{\n comarea = pubarea;\n }\n\n var query_params={\n book_id:book_id,\n comment:comarea,\n to_comment_id:to_comment_id\n };\n\n $.ajax( \"/gatew/goodsgw/addgoodscomment\",{\n data: query_params,\n success: function(response){\n if(response.return_code ==0 ){\n my.model.getCommont(my.model.page());\n $('#modal-commentsucc').modal();\n $(my.pageSelector + \" .pubarea\").val('');\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n // Util.alert(\"您的网络不给力,请检查网络!\");\n }\n });\n\n },\n\n getMyUserInfo: function(){\n var self = this;\n $.ajax( api.common.getMyUserInfo,{\n success: function(response){\n var data = response.data;\n if (response.return_code === 0) {\n var userphone = response.data.phone;\n var start = userphone.substr(0,3);\n var end = userphone.substr(7,4);\n my.model.sendPhone(start+\"****\"+end);\n my.model.myAvatar(response.data.image_id);\n } else {\n galert(response.return_message);\n }\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n // Util.alert(\"您的网络不给力,请检查网络!\");\n },\n loginCallBack:function(){\n my.model.getMyUserInfo();\n\n }\n\n\n });\n },\n\n showConfirm : function(){\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n my.pageInf.consignbuy(book_id,goods_type);\n },\n\n editComment : function(data,e){\n var self = this;\n var t = e.currentTarget;\n //var t = theEvent.target || theEvent.srcElement; //IE和Chrome下是srcElement FF下是target\n var texcom = $(t).html();\n if(texcom==\"编辑留言\"){\n $(\"#comment .editcont\").show();\n //$(\"#comment .checkcont\").show();\n $(\"#comment .pubcont\").hide();\n\n my.model.isShow(true);\n\n $(t).html(\"取消编辑\");\n }else if(texcom==\"取消编辑\"){\n my.model.isShow(false);\n $(\"#comment .editcont\").hide();\n $(\"#comment .checkcont\").hide();\n $(\"#comment .pubcont\").show();\n $(t).html(\"编辑留言\");\n }\n },\n\n buySure : function(){\n //先确认购买获得订单\n var self = this;\n var query_params={\n book_id:my.model.book_id(),\n goods_type:10\n };\n // $.ajax( \"/gmmweb/ordergw/accountbuy\",{\n $.ajax( \"/gatew/ordergw/accountbuy\",{\n data: query_params,\n success: function(response){\n if(response.return_code ==0 ){\n //orderdetail_data.accountbuy.parse(response,my.model);\n var goods_type = my.model.goods_type();\n var order_id = response.data.order_id;\n var game_id = my.model.game_id();\n my.pageInf.routeToPay(response.data.gbao_url,goods_type,order_id,game_id);\n return;\n\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n\n selCheck:function(data,e){\n var self = my.model;\n var arrayPush = my.model.arrayPush();\n var selArea = \"\";\n var t = e.currentTarget;//theEvent.target || theEvent.srcElement; //IE和Chrome下是srcElement FF下是target\n var field = $(\".checkcont\");\n var isCheck = $(t).prop('checked');\n if (isCheck){\n arrayPush.push( Number(data.comment_id));\n my.model.arrayPush(arrayPush);\n }else{\n for (var i = 0; i < arrayPush.length; i++) {\n if(arrayPush[i] == data.comment_id){\n my.model.arrayPush().splice(i,1);\n }else{}\n }\n $(\".comment .editcont\").find(\".allselect\").attr(\"checked\",false);\n }\n\n return true;\n },\n\n selectAll:function(data,e){\n var self=this;\n // var theEvent = window.event ;//|| arguments.callee.caller.arguments[1];\n var t = e.currentTarget;//theEvent.target || theEvent.srcElement; //IE和Chrome下是srcElement FF下是target\n var field = $(\".checkcont\");\n var checkflag = self.checkflag();\n var isCheck = $(e.currentTarget).prop('checked');\n var arrayPush = my.model.arrayPush();\n // 如果全选按钮状态是未选中\n if (isCheck){\n for (var i = 0; i < field.length; i++){\n field[i].checked = true;\n var nowId =$(field[i]).next(\".avatar\").attr(\"commentid\");\n arrayPush.push(Number(nowId));\n }\n my.model.arrayPush(arrayPush);\n\n self.checkflag(\"true\");\n }else{\n for (var i = 0; i < field.length; i++){\n field[i].checked = false;\n var nowId=$(field[i]).next(\".avatar\").attr(\"commentid\");\n for (var j = 0; j < arrayPush.length; j++) {\n if(arrayPush[j] == nowId){\n my.model.arrayPush().splice(j,1);\n }else{}\n }\n\n }\n my.model.arrayPush(arrayPush);\n // 更改全选按钮选中标志\n self.checkflag(\"false\");\n }\n\n return true;\n },\n\n repCommont: function(data,e){\n var t = e.currentTarget;\n var replyTxt = $(t).prev('.msgbox').find('textarea').val();\n my.model.replyTxt(replyTxt);\n my.model.comment_id(data.comment_id);\n my.model.nick_name(data.nick_name);\n my.model.to_nick_name(data.nick_name);\n my.model.comType(\"reply\");\n my.model.btnPubMeg();\n },\n\n deltOnePopMeg:function(data,e){\n var t = e.currentTarget;\n $(t).parents(\".popover\").hide();\n my.model.deletype(\"onlyone\");\n my.model.detecomid(data.comment_id);\n\n $(\"#modal-delete-message\").modal(\"show\");\n },\n\n deltAllPopMeg:function(data,e){\n my.model.deletype(\"all\");\n var field = $(\".checkcont\");\n var comentIdArea=my.model.arrayPush();\n console.log(comentIdArea);\n if(comentIdArea==\"\"){\n galert(\"请选择要删除的留言!\");\n return;\n }\n $(\"#modal-delete-message\").modal(\"show\");\n },\n\n //删除留言\n delCommont: function(){\n var self = this;\n var book_id = my.model.book_id();\n var comment_ids = my.model.detecomid();\n var goods_type = my.model.goods_type();\n var query_params={\n book_id:book_id,\n comment_ids:comment_ids,\n goods_type:goods_type\n };\n $.ajax( \"/gatew/goodsgw/deletegoodscomment\",{\n data: query_params,\n success: function(response){\n if(response.return_code ==0 ){\n my.model.getCommont(my.model.page());\n $(my.pageSelector +\" .checkcont\").show();\n $(\"#modal-delete-message\").modal(\"hide\");\n\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n\n\n //删除某商品下某用户所有留言\n delAllCommont:function(){\n var self = this;\n var comentIdArea=my.model.arrayPush();\n var commentList =$(\"#commentList li\").find(\".checkcont\");\n var comentIdfield = JSON.stringify(comentIdArea) .replace(\"[\",\"\").replace(\"]\",\"\");\n console.log(comentIdfield);\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var query_params={\n book_id:book_id,\n comment_ids:comentIdfield,\n goods_type:goods_type\n };\n\n console.log(query_params);\n $.ajax( \"/gatew/goodsgw/deletegoodscomment\",{\n data: query_params,\n success: function(response){\n console.log(response);\n if(response.return_code ==0 ){\n if(comentIdArea.length < commentList.length ){\n my.model.getCommont(my.model.page());\n }else if(comentIdArea.length == commentList.length){\n my.model.getCommont(my.model.page()-1);\n }\n\n $(\"#comment .editcont\").find(\".checkbox-inline\").find(\"input\").attr(\"checked\",false);\n $(\"#comment .pubcont\").show();\n $(\"#modal-delete-message\").modal(\"hide\");\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n\n },\n\n //删除某商品下某用户所有留言\n //delUserCommont:function(b_uid){\n // var self = this;\n // var book_id = my.model.book_id();\n // var query_params={\n // b_uid: b_uid,\n // book_id:book_id\n // };\n // console.log(query_params);\n // return;\n // $.ajax( \"/gmmweb/goodsgw/deleteUserGoodsComment\",{\n // data: query_params,\n // success: function(response){\n // if(response.return_code ==0 ){\n // detail_data.common.parse(response,my.model);\n //\n // }else{\n // galert(response.return_message);\n // }\n //\n // },\n // error : function() {\n // galert(\"您的网络不给力,请检查网络!\");\n // }\n // });\n //},\n\n\n blackList: function(data,e){\n var self = this;\n console.log(data);\n var t = e.currentTarget;\n $(t).parents(\".popover\").hide();\n var b_uid = data.b_uid;\n var query_params={\n //memo:memo,\n black_b_uid:b_uid\n };\n // $.ajax( \"/gmmweb/mygw/adduserblacklist\",{\n $.ajax( \"/gatew/userapi/adduserblacklist\",{\n data: query_params,\n success: function(response){\n console.log(response);\n if(response.return_code ==0 ){\n var loginUserId = my.model.loginUserId();\n var seller_b_uid = my.model.seller_b_uid();\n my.model.getCommont(my.model.page());\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n deleteblacklist: function(data,e){\n var self = this;\n console.log(data);\n var t = e.currentTarget;\n var query_params={\n //memo:memo,\n black_b_uid:data.b_uid\n };\n //$.ajax( \"/gmmweb/mygw/deleteuserblacklist\",{\n $.ajax( \"/gatew/userapi/deleteuserblacklist\",{\n data: query_params,\n success: function(response){\n console.log(response);\n if(response.return_code ==0 ){\n my.model.getCommont(my.model.page());\n }else{\n galert(response.return_message);\n }\n\n },\n error : function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n\n goodsRefresh: function(book_id,goods_type){\n var self = this;\n var params = {\n 'book_id':book_id || '',\n 'goods_type':goods_type\n };\n console.log(params);\n $.ajax( \"/gatew/mygw/goodsRefresh\",{\n data:params,\n success: function(response){\n var data = response.data;\n if (response.return_code === 0) {\n my.model.gotoDetail()\n $('#modal-refreshsucc').modal();\n } else if (response.return_code === -20008) { //已擦亮,过一小时再擦\n $('#modal-refreshfail').modal();\n } else {\n galert(response.return_message);\n }\n }\n });\n },\n\n offSelect: function(model,e,cb) {\n var self = this;\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var params = {\n 'book_id':book_id || '',\n 'goods_type':goods_type\n };\n //$.ajax( \"/gmmweb/mygw/goodsOffShelf\",{\n $.ajax( \"/gatew/mygw/goodsOffShelf\",{\n data:params,\n success: function(response){\n var data = response.data;\n if (response.return_code === 0) {\n cb && cb();\n my.model.gotoDetail();\n $('#modal-offconfirm').modal('hide');\n } else {\n galert(response.return_message);\n }\n\n }\n });\n },\n\n delSelect: function() {\n var self = this;\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var params = {\n 'book_id':book_id || '',\n 'goods_type':goods_type\n\n };\n $.ajax( \"/gatew/gmmMyGw/deleteBatchGoods\",{\n data:params,\n success: function(response){\n var data = response.data;\n if (response.return_code === 0) {\n $('#modal-delconfirm').modal('hide');\n $('#delgood_sucess').modal('show');\n setTimeout(\n function(){\n my.pageInf.mypublish();\n },2000);\n\n } else {\n galert(response.return_message);\n }\n\n }\n });\n },\n\n\n scrollToComment: function(){\n $('.page-goods-detail .nav-tabs a[href=\"#comment\"]').tab('show');\n $('.page-goods-detail #panel-detail')[0].scrollIntoView();\n },\n closeContactTips:function(){\n dataAccess.setCookie('showContactTips',0);//联系卖家提示图片是否显示\n my.model.showContactTips(false);\n },\n //获取slider显示的4个图片类名\n getSliderClass:function(index,list){\n var className = '';\n if (index == 0){\n className = 'active';\n } else if (index == 1){\n className = 'next';\n } else if (index == list.length - 1){\n className = 'prev';\n } else if (index == list.length - 2){\n className = 'prev2';\n } else {\n\n }\n return className;\n },\n //获取slider显示的4个图片src地址\n getSliderSrc:function(index,list,data){\n var url = '';\n if (index == 0 || index == 1 || index == list.length - 1 || index == list.length - 2){\n url = data.small_url;\n } else {\n url = 'https://profile.gmmsj.com/nasfile/gmm/img/tmp_img_1672906999529.png';\n }\n return url;\n },\n //检查编辑次数限制\n checkAccountEdit:function(cb) {\n $.ajax(api.jsTrade.checkAccountEdit,{\n data: {\n game_id:my.model.game_id(),\n book_id:my.model.book_id()\n },\n success: function(response) {\n if (response.return_code == 0 ) {\n cb && cb();\n } else {\n galert(response.return_message);\n }\n }\n });\n },\n //点击图片的轮播\n runSlider:function(index,i,item,e){\n var prev2Img = null;\n var prevImg = null;\n var nextImg = null;\n var list = document.querySelectorAll('.slider' + i + ' li');\n var size = list.length;\n my.model.activeImgIndex(i - 1,'jump',index);\n var el = $(e.currentTarget).closest('li');\n el.siblings().removeClass('prev2').removeClass('prev').removeClass('next').removeClass('active');\n $('.slider' + i + ' .arrow').removeClass('disabled');\n if (index == 0){\n list[size - 2] && (list[size - 2].className = 'prev2');\n list[size - 1] && (list[size - 1].className = 'prev');\n list[index + 1] && (list[index + 1].className = 'next');\n list[index + 1] && (nextImg = list[index + 1].querySelector('img'));\n } else if (index == 1){\n if (size == 3){\n list[index - 1] && (list[index - 1].className = 'prev');\n list[index + 1] && (list[index + 1].className = 'prev2');\n } else {\n list[size - 1] && (list[size - 1].className = 'prev2');\n list[index - 1] && (list[index - 1].className = 'prev');\n list[index + 1] && (list[index + 1].className = 'next');\n }\n list[index - 1] && (prevImg = list[index - 1].querySelector('img'));\n list[index + 1] && (nextImg = list[index + 1].querySelector('img'));\n } else if (index + 1 == size){//最后一张\n if (size == 3){\n list[0] && (list[0].className = 'next');\n } else {\n list[index - 2] && (list[index - 2].className = 'prev2');\n list[index - 1] && (list[index - 1].className = 'prev');\n list[0] && (list[0].className = 'next');\n }\n list[index - 2] && (prev2Img = list[index - 2].querySelector('img'));\n list[index - 1] && (prevImg = list[index - 1].querySelector('img'));\n list[0] && (nextImg = list[0].querySelector('img'));\n } else {\n list[index - 2] && (list[index - 2].className = 'prev2');\n list[index - 1] && (list[index - 1].className = 'prev');\n list[index + 1] && (list[index + 1].className = 'next');\n list[index - 2] && (prev2Img = list[index - 2].querySelector('img'));\n list[index - 1] && (prevImg = list[index - 1].querySelector('img'));\n list[index + 1] && (nextImg = list[index + 1].querySelector('img'));\n }\n list[index] && (list[index].className = 'active');\n if (size == 2){\n if (index == 0){\n $('.slider' + i + ' .left').addClass('disabled');\n }\n if (index == 1){\n $('.slider' + i + ' .right').addClass('disabled');\n }\n }\n if (size == 3){\n if (index == 1){\n $('.slider' + i + ' .right').addClass('disabled');\n }\n if (index == 2){\n $('.slider' + i + ' .left').addClass('disabled');\n }\n }\n prev2Img && prev2Img.dataset.src && prev2Img.setAttribute('src',prev2Img.dataset.src);\n prevImg && prevImg.dataset.src && prevImg.setAttribute('src',prevImg.dataset.src);\n nextImg && nextImg.dataset.src && nextImg.setAttribute('src',nextImg.dataset.src);\n },\n //初始化轮播翻页\n initSlider:function(listLength){\n var listLength = listLength;//其他信息有几个轮播\n var nextImg = null;\n var indexList = [];\n for (var i=0;i < listLength;i++){\n function slider(i) {\n return function () {\n $(document).on('click', '.slider' + (i + 1) + ' .arrow.right', function (event) {\n if($(this).hasClass('disabled')) return;\n var el = $('.slider' + (i + 1) + ' .active');\n var index = el.index();\n var list = document.querySelectorAll('.slider' + (i + 1) + ' li');\n my.model.activeImgIndex(i,'add');\n $(this).siblings('.left').removeClass('disabled');\n if (list.length === 2){\n if (index == 0) {//active是第一\n list[0].className = 'prev';\n list[1].className = 'active';\n $(this).addClass('disabled');\n }\n }\n if (list.length === 3){\n if (index == 0) {//active是第一\n list[0].className = 'prev';\n list[1].className = 'active';\n list[2].className = 'prev2';\n $(this).addClass('disabled');\n } else if (index == 2) {//active是第二\n list[0].className = 'active';\n list[1].className = 'next';\n list[2].className = 'prev';\n }\n }\n if (list.length > 3){\n el.siblings().removeClass('prev2');\n if (el.index() + 1 == list.length - 1) { //active是倒数第二\n if (index >= 1){\n list[index - 1].className = 'prev2';\n }\n list[index].className = 'prev';\n list[0].className = 'next';\n list[index + 1].className = 'active';\n } else if (el.index() == list.length - 1) { //active是倒数第一\n if (index >= 1){\n list[index - 1].className = 'prev2';\n }\n list[index].className = 'prev';\n list[0].className = 'active';\n list[1].className = 'next';\n } else if (index == 0) {//active是第一\n list[index].className = 'prev';\n list[index + 1].className = 'active';\n list[index + 2].className = 'next';\n nextImg = list[index + 2].querySelector('img');\n nextImg.dataset.src && nextImg.setAttribute('src',nextImg.dataset.src);\n list[list.length - 1].className = 'prev2';\n } else {\n if (index >= 1){\n list[index - 1].className = 'prev2';\n }\n list[index].className = 'prev';\n list[index + 1].className = 'active';\n list[index + 2].className = 'next';\n nextImg = list[index + 2].querySelector('img');\n nextImg.dataset.src && nextImg.setAttribute('src',nextImg.dataset.src);\n }\n }\n });\n $(document).on('click', '.slider' + (i + 1) + ' .arrow.left', function (event) {\n if($(this).hasClass('disabled')) return;\n var el = $('.slider' + (i + 1) + ' .active');\n var index = el.index();\n var list = document.querySelectorAll('.slider' + (i + 1) + ' li');\n my.model.activeImgIndex(i,'reduce');\n $(this).siblings('.right').removeClass('disabled');\n if (list.length === 2){\n if (index == 1) {//active是第二\n list[0].className = 'active';\n list[1].className = 'next';\n $(this).addClass('disabled');\n }\n }\n if (list.length === 3){\n if (index == 0) {//active是第一\n list[0].className = 'next';\n list[1].className = '';\n list[2].className = 'active';\n $(this).addClass('disabled');\n } else if (index == 1) {//active是第二\n list[list.length - 2].className = 'prev2';\n list[list.length - 1].className = 'prev';\n list[0].className = 'active';\n list[index].className = 'next';\n }\n }\n if (list.length > 3){ //至少2张图,只有2张就没有上一张,不能查看上一张\n if ($(\".slider\" + (i + 1)).find('li.next').length > 0 && list.length > 2){ //有next,大于2张图\n el.siblings().removeClass('next');\n }\n if (index == 0) {//active是第一\n list[index].className = 'next';\n list[list.length - 1].className = 'active';\n list[list.length - 2].className = 'prev';\n list[list.length - 3].className = 'prev2';\n nextImg = list[list.length - 3].querySelector('img');\n nextImg.dataset.src && nextImg.setAttribute('src',nextImg.dataset.src);\n } else if (index == 2) {//active是第三\n list[index - 2].className = 'prev';\n list[index - 1].className = 'active';\n list[index].className = 'next';\n list[list.length - 1].className = 'prev2';\n } else if (index == 1) {//active是第二\n list[list.length - 2].className = 'prev2';\n list[list.length - 1].className = 'prev';\n list[0].className = 'active';\n list[index].className = 'next';\n } else {\n list[index - 3].className = 'prev2';\n list[index - 2].className = 'prev';\n list[index - 1].className = 'active';\n list[index].className = 'next';\n nextImg = list[index - 3].querySelector('img');\n nextImg.dataset.src && nextImg.setAttribute('src',nextImg.dataset.src);\n }\n }\n });\n }\n }\n var run = slider(i);\n run();\n run = null;\n indexList[i] = 1;\n }\n my.model.sliderImgIndex(indexList);\n },\n //计算当前轮播图片index\n activeImgIndex:function(sliderIndex,type,index){\n var size = $('.slider' + (sliderIndex + 1) + ' li').length;\n var list = my.model.sliderImgIndex();\n if (type == 'add'){\n if (list[sliderIndex] == size){\n list[sliderIndex] = 1;\n } else {\n list[sliderIndex] += 1;\n }\n } \n if (type == 'reduce'){\n if (list[sliderIndex] == 1){\n list[sliderIndex] = size;\n } else {\n list[sliderIndex] -= 1;\n }\n } \n if (type == 'jump'){\n list[sliderIndex] = index + 1;\n } \n my.model.sliderImgIndex(list);\n },\n //编辑先下架再重新上架\n gotoEdit:function() {\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var game_id = my.model.game_id();\n my.model.offSelect(null,null,function(){\n my.pageInf.gotoGoodsReshelf(book_id,game_id,goods_type);\n });\n },\n //鼠标滚轮添加事件\n watchMousewheel:function(){\n //给页面绑定滑轮滚动事件\n if (document.addEventListener) { //火狐使用DOMMouseScroll绑定\n document.addEventListener('DOMMouseScroll', throttle(my.model.scrollFunc, 1000), false);\n }\n //其他浏览器直接绑定滚动事件\n window.onmousewheel = document.onmousewheel = throttle(my.model.scrollFunc, 300);//IE/Opera/Chrome\n },\n removeWatchMousewheel:function(){ \n if (document.removeEventListener) { //火狐使用DOMMouseScroll绑定\n document.removeEventListener('DOMMouseScroll', throttle(my.model.scrollFunc, 300), false);\n }\n //其他浏览器直接绑定滚动事件\n window.onmousewheel = document.onmousewheel = function(){};//IE/Opera/Chrome\n },\n //监听鼠标滚动\n scrollFunc:function(e){\n e = e || window.event;\n if(e.wheelDelta){//其他浏览器\n if(e.wheelDelta > 0){//向上滚动\n my.model.reSetScroll(\"up\");\n }else{//向下滚动\n my.model.reSetScroll(\"down\");\n }\n }else if(e.detail){//火狐浏览器\n if(e.detail > 0){//向上滚动\n my.model.reSetScroll(\"up\");\n }else{//向下滚动\n my.model.reSetScroll(\"down\");\n }\n }\n },\n //鼠标滚动后,执行方法\n reSetScroll:function(type){\n var sliderList = document.querySelectorAll('.nav-anchor .slider');\n var windowHeight = window.innerHeight / 2;//当前浏览器的可见高度的一半\n var num = my.model.mouseScrollNum();\n if(type == \"up\"){\n if(num < 1){\n return\n }\n num -= 1;\n my.model.mouseScrollNum(num);\n var el = sliderList[num];\n var sliderTop = $(el).offset().top;//下一个类距离顶部的高度\n var sliderHeight = $(el).height() / 2;//下一个类元素的高度的一半\n document.documentElement.scrollTop = (sliderTop - windowHeight) + sliderHeight;//元素减去屏幕的一半(不然元素会贴顶,减去之后就到屏幕一半的位置),然后在加上自身高度的一半(下来屏幕高度的一半的位置之后,加上自身高度的一半就居中了)\n }else if(type == \"down\"){\n num += 1;\n if(num >= 5){\n return\n }\n my.model.mouseScrollNum(num);\n var el = sliderList[num -1];\n var sliderTop = $(el).offset().top;//下一个类距离顶部的高度\n var sliderHeight = $(el).height() / 2;//下一个类元素的高度的一半\n document.documentElement.scrollTop = (sliderTop - windowHeight) + sliderHeight;//元素减去屏幕的一半(不然元素会贴顶,减去之后就到屏幕一半的位置),然后在加上自身高度的一半(下来屏幕高度的一半的位置之后,加上自身高度的一半就居中了)\n // for(var index = 0 ; index< sliderList.length; index++){\n // if (sliderList[index] && isInViewPortOfTwo(sliderList[index])){\n // if(index == sliderList.length){//说明已经是最后一个类了\n // my.model.removeWatchMousewheel();\n // break;\n // }\n // var sliderTop = $(\".\" + sliderList[index + 1]).offset().top;//下一个类距离顶部的高度\n // var sliderHeight = $(\".\" + sliderList[index + 1]).height() / 2;//下一个类元素的高度的一半\n // // var sliderTop = $(\"#\" + sliderList[index + 1].id + \" .slider\").offset().top;//下一个类距离顶部的高度\n // // var sliderHeight = $(\"#\" + sliderList[index + 1].id + \" .slider\").height() / 2;//下一个类元素的高度的一半\n // document.documentElement.scrollTop = (sliderTop - windowHeight) + sliderHeight;//元素减去屏幕的一半(不然元素会贴顶,减去之后就到屏幕一半的位置),然后在加上自身高度的一半(下来屏幕高度的一半的位置之后,加上自身高度的一半就居中了)\n // // my.model.watchMousewheel();\n // }\n // }\n }\n }, \n closeRight:function(){\n var $hideItems = $('.fixicons .gotop').prev().prevAll().not(\"#newyhq-tips-side\");\n $hideItems.slideUp('fast', function () {\n $('#J_toggleRight .down-txt').text('展开');\n $('#J_toggleRight .iconfont').removeClass('icon-down-sd').addClass('icon-up-sd');\n });\n },\n // 查询游戏是否维护\n checkGameTenance:function(){\n var game_id = my.model.gameId() || my.model.game_id();\n var area_id = my.model.areaId();\n var group_id = my.model.groupId();\n var query_params={\n game_id:game_id,\n area_id:area_id,\n group_id:group_id\n };\n $.ajax('/gatew/gamemaintenancetime/queryByIds', {\n type : \"get\",\n data: query_params,\n success: function(response) {\n var data = response.data;\n if (response.return_code === 0) {\n if(data && data.memo){\n my.model.gameTenance(true);\n my.model.gameTenanceMemo(data.memo || '');\n $(\"#modal-game-tenance\").modal('show');\n }\n }\n },\n error: function() {\n galert(\"您的网络不给力,请检查网络!\");\n }\n });\n },\n //检查是否是号商\n accountCheckCanBuy:function(cb) {\n $.ajax(api.jsTrade.accountCheckCanBuy,{\n data: {\n goods_type:my.model.goods_type(),\n book_id:my.model.book_id()\n },\n success: function(response) {\n if (response.return_code == 0 ) {\n } else {\n my.model.shLimitBuy(true);//收号商品限制购买\n }\n }\n });\n }\n };\n };\n\n this.bindEvent = function(){\n var self = this;\n\n login.addObserver(my.pageSelector,my.entry,my.model);//不需要登录,但如果登录了,通知到此方法\n\n $(document).on(\"click\",\" #page-goods-detail-carousel .carousel-inner .item img\", function(){\n var nowIndex= $(this).parent(\".item\").attr(\"data-index\");\n my.model.nowIndex(nowIndex);\n $(\".page-goods-detail-bigimg\").modal('show');\n })\n\n $('.page-group #page-goods-detail-carousel').on('slid.bs.carousel', function (event) { //监听轮播图的变化后\n if(my.model.changeTabCarousel()){\n var index = $('.page-group #imgLists .active').data('index');\n var target = my.model.needChangeTab().indexOf(index);\n if(target !== -1){\n my.model.activeIndex(target)\n }else{\n if( event.direction === 'right'){\n var targetRight = my.model.needChangeTab().indexOf(index + 1);\n if(targetRight !== -1 ){\n my.model.activeIndex(targetRight - 1);\n }\n }\n }\n }else{\n my.model.changeTabCarousel(true)\n }\n\n });\n $('.page-group #page-goods-detail-carousel').on('slide.bs.carousel', function (event) { //监听轮播图的变化前\n //懒加载\n var imgActive = $(event.currentTarget).find('.item.active');\n var dataSrc = '';\n if( event.direction === 'right'){//向右滚\n if ($(imgActive).index() == 0){\n dataSrc = $('.page-group #page-goods-detail-carousel .item').last().find('img').attr('data-src');\n $('.page-group #page-goods-detail-carousel .item').last().find('img').attr('src',dataSrc);\n } else {\n dataSrc = imgActive.prev().find('img').attr('data-src');\n imgActive.prev().find('img').attr('src',dataSrc);\n }\n } else {\n dataSrc = imgActive.next().find('img').attr('data-src');\n imgActive.next().find('img').attr('src',dataSrc);\n }\n });\n $('.page-group #page-goods-detail-sceeen').on('slide.bs.carousel', function (event) { //监听轮播图的变化前\n //懒加载\n var imgActive = $(event.currentTarget).find('.item.active');\n var dataSrc = '';\n if( event.direction === 'right'){//向右滚\n if ($(imgActive).index() == 0){\n dataSrc = $('.page-group #page-goods-detail-sceeen .item').last().find('img').attr('data-src');\n $('.page-group #page-goods-detail-sceeen .item').last().find('img').attr('src',dataSrc);\n } else {\n dataSrc = imgActive.prev().find('img').attr('data-src');\n imgActive.prev().find('img').attr('src',dataSrc);\n }\n } else {\n dataSrc = imgActive.next().find('img').attr('data-src');\n imgActive.next().find('img').attr('src',dataSrc);\n }\n });\n\n $(document).on(\"mouseenter\",my.pageSelector + \" .phonebuy\", function(){\n $(this).children(\"span\").attr(\"class\",\"\").addClass(\"dup\");\n $(this).children(\".phonecode\").children(\"cite\").show(220);\n $(this).children(\".phonecode\").show(200);\n })\n $(document).on(\"mouseleave\",my.pageSelector + \" .phonebuy\", function(){\n $(this).children(\"span\").attr(\"class\",\"\").addClass(\"down\");\n $(this).children(\".phonecode\").children(\"cite\").hide();\n $(this).children(\".phonecode\").hide(200);\n })\n\n my.model.loginUserId(my.login.getLoginUserId());\n\n $(document).on('click',my.pageSelector + ' #nav li', function(event) {\n $(this).addClass('active').siblings().removeClass('active');\n });\n\n $(document).on('click',my.pageSelector + ' .open-reply', function(event) {\n $(my.pageSelector +\" .reply-msg-container\").hide();\n $(this).next('.reply-msg-container').show();\n });\n var scrollHandle = function(){\n var anchorList = document.querySelectorAll('.nav-anchor');\n var lastId = '';\n anchorList.forEach(function(anchor) {\n if (isInViewPortOfOne(anchor)){\n lastId = anchor.id;\n }\n })\n // console.log(lastId);\n $(my.pageSelector +\" #nav #\" + lastId + \"-nav\").addClass('active').siblings().removeClass('active');\n };\n $(window).on('scroll',throttle(scrollHandle, 50));\n };\n\n\n //actionConf里用到id对应action,name没使用,由服务端为准\n this.actionConf = [\n {\n id:'edit',\n name:'编辑',\n action:function(obj){\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var game_id = my.model.game_id();\n my.model.checkAccountEdit(function(){\n $('#modal-editconfirm').modal();\n // my.pageInf.gotoGoodsEdit(book_id,game_id,goods_type);\n });\n }\n },\n {\n id:'update',\n name:'擦亮',\n action:function(obj){\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n my.model.goodsRefresh(book_id,goods_type);\n }\n },\n {\n id:'off_shelf',\n name:'下架',\n action:function(obj){\n $('#modal-offconfirm').modal();\n }\n },\n {\n id:'on_shelf',\n name:'重新上架',\n action:function(obj){\n var book_id = my.model.book_id();\n var goods_type = my.model.goods_type();\n var game_id = my.model.game_id();\n my.model.checkAccountEdit(function(){\n my.pageInf.gotoGoodsReshelf(book_id,game_id,goods_type);\n });\n }\n },\n\n {\n id:'delete_product',\n name:'删除',\n action:function(obj){\n $('#modal-delconfirm').modal();\n }\n }\n\n ]\n //定义入口函数\n this.entry = function(){\n // strhelp.checkParams(\"book_id\");\n var goods_type = window.pageParamsConfig.goods_type ? window.pageParamsConfig.goods_type : strhelp.urlParamName(\"goods_type\");\n var book_id = window.pageParamsConfig.book_id ? window.pageParamsConfig.book_id : strhelp.urlParamName(\"book_id\");\n my.model.goods_type(goods_type);\n my.model.book_id(book_id);\n my.model.displayAcc(my.login.getDisplayAccount());\n my.model.loginUserId(my.login.getLoginUserId());\n my.model.gotoDetail();\n my.model.getCommont(1);\n var order_id = strhelp.urlParamName(\"order_id\");\n if(order_id && typeof(order_id)!='undefined'){\n my.model.snapshot(false); \n }\n // my.model.initSlider();\n // my.model.watchMousewheel();\n my.model.closeRight();\n };\n \n })\n\n})\n"],"names":["define","pcbase","ko","bootstrap","galert","game","detail_data","dao","strhelp","lightbox","login","router","dataAccess","pageInf","qrcode","api","extend","isInViewPortOfOne","el","viewPortHeight","window","innerHeight","document","documentElement","clientHeight","body","offsetTop","scrollTop","top","my","this","throttle","func","delay","prev","Date","now","context","args","arguments","apply","init","needLogin","pageSelector","model","roleInfoBg","observable","commentBg","getSwipeNavList","toastText","resetImageList","observableArray","swipeNavList","mouseScrollNum","showRealName","snapshot","hasCoupon","yhprice","create_time","btnbuy","suportType","checkTypelist","bottom_area_operation","bottom_area_operation_h5","seller_credit_level","seller_credit_level_h5","seller_nickname","timesBind","imageId","page","jumpNum","s_book_id","sendPhone","arrayPush","loginUserId","comType","isShow","comment_id","replyTxt","myAvatar","detecomid","deletype","nick_name","to_nick_name","contentHtml","good_type_name","gameId","areaId","groupId","gamename","imgUrl","totalPage","is_favorite","favorite_flag","user_b_uid","seller_b_uid","checkflag","nowIndex","goods_title","p_name","goods_type","game_id","game_name","goods_type_name","price","goods_sub_title","favorite_cnt","view_cnt","state","state_desc","p_offshelf_time","goods_main_detail","goods_more_detail","image_list","roleInfoImgList","equipList","skillList","bagList","monsterList","tabNameListAll","activeIndex","changeTabCarousel","sellerList","screenList","haveScreenPic","screenName","sliderImgIndex","imgNums","needChangeTab","commentList","commentTotalSize","displayAcc","book_id","showContactTips","s_mid","s_b_uid","hadNewUserCouponList","showInsurance","isGuarante","gameTenance","gameTenanceMemo","guaranteList","text","name","key","tips","realList","isTong","popName","tipsbox","insureTime","shLimitBuy","showTips","data","e","types","$","currentTarget","left","offset","parents","crossArea","attr","transregional_info","receiveAreaList","showArea","getReceiveAreaList","parent","siblings","show","find","css","fn","timer","setTimeout","queryCoupons","ajax","type","url","method","params","JSON","stringify","amount","Number","success","resp","return_code","available","length","list","getNewCouponList","sort","a","b","discount","toFixed","return_message","error","getInsuranceSwitch","object_id","response","memo","new_user_coupons","i","j","catId","gameAppIds","minamount","itemTypesList","itemTypes","split","k","closeRealName","open","showRealNameConfirm","query_params","realName","getStatus","realNameStatus","modal","contact","callbackAfterLogin","supportCallback","gotoGchat","title","picture_url","matrix_name","b_mid","getCookie","b_b_uid","unsupportCallback","checkIESupport","checkLoginStatusWithShownLoginPage","action","id","param","actionConf","bindBoxer","closest","infobindBoxer","parentId","parentElement","getGoodsList","goodType","keyword","refer","gameOs","operatorId","tradeMode","getGoodsListUrl","setAccountBtn","classname","getCsSwipeNav","detail","result","typeImgList","arr","navigationText","forEach","push","bg","item","itemIndex","parse","obj","map","val","small_url","reSetImgageSizeUrl","Object","assign","bg_comment","fullpage","navigation","navigationPosition","autoHeight","slideSelector","sectionSelector","initSlider","copyContent","input","createElement","appendChild","setAttribute","select","execCommand","hide","removeChild","gotoDetail","bookId","order_id","urlParamName","jsTrade","goodDetail","account","b_uid","imglist","conf","queryGoodsName","imgSrc","goodTitle","jiathis_config","siteNum","sm","summary","shortUrl","hideMore","saveGoodsHis","getGameName","getPageModule","pageModel","queryYhqList","hasLoggedIn","safeType","safe_type_data","is_support_insurance","is_accept_insurance","templist","each","index","nowTpyeClass","eq","p_values","account_insurance_time","time","replace","h5Url","queryAdvert","ad_position","getScreenShots","area_id","group_id","checkGameTenance","goodsReqLog","getLoginUserId","merchant","accountCheckCanBuy","nameList","imgResult","needCTab","resData","screen","concat","images_list","smallUrl","indexOf","lastIndexOf","substring","changeTab","carousel","curImg","curLink","getCommont","currentPageNumber","sort_dir","limit","common","gameid","gameName","getGameByGameId","onCollect","dataType","loginCallBack","btnPubMeg","pubarea","to_comment_id","comarea","comment","getMyUserInfo","userphone","phone","start","substr","end","image_id","showConfirm","consignbuy","editComment","t","texcom","html","buySure","routeToPay","gbao_url","selCheck","isCheck","prop","splice","selectAll","self","field","checked","nowId","next","repCommont","deltOnePopMeg","deltAllPopMeg","comentIdArea","delCommont","comment_ids","delAllCommont","comentIdfield","blackList","black_b_uid","deleteblacklist","goodsRefresh","offSelect","cb","delSelect","mypublish","scrollToComment","tab","scrollIntoView","closeContactTips","setCookie","getSliderClass","className","getSliderSrc","checkAccountEdit","runSlider","prev2Img","prevImg","nextImg","querySelectorAll","size","activeImgIndex","removeClass","querySelector","addClass","dataset","src","listLength","slider","on","hasClass","indexList","run","sliderIndex","gotoEdit","gotoGoodsReshelf","watchMousewheel","addEventListener","scrollFunc","onmousewheel","removeWatchMousewheel","removeEventListener","event","wheelDelta","reSetScroll","sliderList","windowHeight","num","sliderTop","sliderHeight","height","closeRight","$hideItems","prevAll","not","slideUp","bindEvent","addObserver","entry","target","direction","targetRight","imgActive","dataSrc","last","children","scrollHandle","anchorList","lastId","anchor","pageParamsConfig","getDisplayAccount"],"mappings":"AAUAA,QAAQ,SAAS,KAAK,YAAY,SAAS,OAAO,uBAAuB,MAAM,UAAU,WAAW,QAAQ,SAAS,aAAa,UAAU,SAAS,MAAM,YAAY,SAAUC,EAAOC,EAAGC,EAAUC,EAAOC,EAAKC,EAAYC,EAAIC,EAAQC,EAASC,EAAMC,EAAOC,EAAWC,EAAQC,EAAOC,GACrR,MAAOd,GAAOe,OAAO,WACjB,YAIA,SAASC,GAAmBC,GAExB,KAAMC,GAAiBC,OAAOC,aAAeC,SAASC,gBAAgBC,cAAgBF,SAASG,KAAKD,aAC9FE,EAAYR,EAAGQ,UACfC,EA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