{"version":3,"file":"/pc/goods/js/detail_cs_yhzt.js.map","sources":["/pc/goods/js/detail_cs_yhzt.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:40\n * @FilePath: /gmm_pc/pc/goods/js/detail_cs_yhzt.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-yhzt\";\n this.model = {\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:[],})\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] = obj;\n }\n })\n }\n })\n }\n })\n my.model.resetImageList(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","getSwipeNavList","observable","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","item","itemIndex","parse","obj","map","val","small_url","reSetImgageSizeUrl","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,EAAYL,SAASC,gBAAgBI,UACrCC,EAAMF,EAAYC,CACxB,OAAcR,GAAiB,KAAxBS,EARX,GAAIC,GAAKC,KAmBLC,EAAW,SAASC,EAAMC,GAC1B,GAAIC,GAAOC,KAAKC,KA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