瀏覽代碼

修改扫码商品参数

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@686 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com 4 年之前
父節點
當前提交
d89ec708aa
共有 1 個文件被更改,包括 11 次插入12 次删除
  1. 11 12
      html/frame0.html

+ 11 - 12
html/frame0.html

@@ -362,27 +362,26 @@
 				toast_loding_show();
 				if (ret) {
 					if (ret.eventType == "success") {
-						if (ret.content.indexOf("?store_id=") > -1) {
-							var _store_id = ret.content.split("?")[1];
-							_store_id = _store_id.split("&")[0];
-							_store_id = _store_id.replace("store_id=", "");
-							// alert(_store_id);
-							if (ret.content.indexOf("goods_id=") > -1) {
+						// console.log(JSON.stringify(ret.content));
+						if (ret.content.indexOf("?store_id=") > -1|| ret.content.indexOf("?qs=") > -1) {
+							if (ret.content.indexOf("?qs=") > -1) {
 								var _goods_id = ret.content.split("?")[1];
-								_goods_id = _goods_id.split("&")[1];
-								_goods_id = _goods_id.replace("goods_id=", "");
-								// alert(_goods_id);
+								_goods_id = _goods_id.replace("qs=", "");
+								var arr=_goods_id.split('--');
+								// console.log(arr);
 								api.openWin({
 									name: 'showgoods',
 									url: './home/showgoods.html',
 									bounces: false,
 									pageParam: {
-										storeid: _store_id,
-										keyid: _goods_id
+										storeid: arr[0],
+										keyid: arr[1]
 									}
 								});
 							} else {
-								//
+							var _store_id = ret.content.split("?")[1];
+							_store_id = _store_id.split("&")[0];
+							_store_id = _store_id.replace("store_id=", "");	
 								api.openWin({
 									name: 'hoteldtl',
 									url: './home/hoteldtl.html',