@hyext/builder-revues 0.0.1-beta.7 → 0.0.1-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * (c) 2024-2024 Alex
4
4
  * Released under the MIT License.
5
5
  */
6
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs-extra"),t=require("path"),o=require("@revues/code-compiler"),n=require("os"),a=require("chalk"),r=require("util"),i=require("glob"),u=require("handlebars"),s=require("live-server"),l=require("archiver"),c=require("ramda");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f,p=d(e),m=d(t),h=d(n),y=d(a),g=d(u),j=d(s),v=d(l),x=d(c);!function(e){e[e.Integration=0]="Integration",e[e.Separate=1]="Separate"}(f||(f={}));const w=m.default.join(h.default.tmpdir(),".revue_cache"),S=f.Integration,P=m.default.resolve(__dirname,"../static"),_="project.config.json";function b(e,t){p.default.copyFileSync(m.default.join(e,_),m.default.join(t,_))}function I(){p.default.existsSync(w)||p.default.mkdirSync(w)}async function k(e,t){I(),function(e){const t=m.default.join(e,"web-adapter.js"),o=require.resolve("@revues/cocos-web-adapter/dist/index.js");if(!p.default.existsSync(t))throw new Error("The web-adapter.js was not found from project root.");p.default.writeFileSync(t,p.default.readFileSync(o))}(e),await o.compilerManager.init({projectPath:e,outputPath:t,cachePath:w}),await o.compilerManager.compileDev(),b(e,t)}const E=y.default.gray("·");var T=(e=>{e=` ${e}`;return{log(...t){const o=r.format.apply(r.format,t);console.log(y.default.white(e),E,o)},fatal(...t){t[0]instanceof Error&&(t[0]=t[0].message.trim());const o=r.format.apply(r.format,t);console.error(y.default.red(e),E,o),process.exit(1)},success(...t){const o=r.format.apply(r.format,t);console.log(y.default.green(e),E,o)}}})("REVUE");const U={test:"//test-extsdk.msstatic.com",prod:"//extsdk-msstatic.cdn.huya.com"};function $(e){return`${U.prod}/sdk/$1/${e.hostId}/${e.extUuid||0}/sdk.js`}function q(e,t,o){const n=p.default.readFileSync(e).toString();p.default.outputFileSync(t,function(e,t,o){return g.default.compile(e)(t,o)}(n,o))}function F(e,t){const n=m.default.join(e,"package"),a=function(e){const t=m.default.join(e,"packageConfig.json");return p.default.readJSONSync(t)}(n),r=a.findIndex((e=>{return(t=e).name===o.pkgFileType.MainPkg&&"."===t.root;var t}));if(-1===r)throw new Error("无法找到主包构建信息");const u=a[r];a.splice(r,1);const s=a;s.length>0&&function(e,t,o){const n=m.default.join(e,t.name);o.forEach((t=>{const o=m.default.join(e,t.name,t.root),a=m.default.join(n,t.root);p.default.moveSync(o,a,{overwrite:!0}),p.default.removeSync(m.default.join(e,t.name))}))}(n,u,s);const l=m.default.join(P,"framework"),c=m.default.join(P,"template"),d=m.default.join(n,u.name);if(S===f.Integration){p.default.copySync(l,m.default.join(e,"framework"));const t=require.resolve("@revues/web-sdk-core"),o=m.default.join(e,"sdk"),n=m.default.join(o,"web-sdk-core.js");p.default.mkdirSync(o),p.default.outputFileSync(n,p.default.readFileSync(t))}return function(e){const{mainPath:t,sourcePathPrefix:o,templatePath:n,hyextSDKUrl:a}=e,r={sourcePathPrefix:o,hyextSDKUrl:a},i=[{input:m.default.join(n,"game-frame.hbs"),output:m.default.join(t,"game-frame.html"),data:r},{input:m.default.join(n,"minigame-page-manager.hbs"),output:m.default.join(t,"index.html"),data:r}];i.forEach((e=>{q(e.input,e.output,e.data)}))}({hyextSDKUrl:$({hostId:t.hostId,extUuid:t.extUuid}),sourcePathPrefix:S===f.Integration?m.default.relative(d,e):"",templatePath:c,mainPath:d}),function(e){const t=i.sync("**/**.wasm",{cwd:e,ignore:D,nodir:!0,absolute:!1});console.log("transform wasm to base64 files: \n",t),t.forEach((t=>{const o=m.default.join(e,t),n=p.default.readFileSync(o).toString("base64");p.default.outputFileSync(o+".txt",n)}))}(d),{mainPath:d,main:u,entryPath:"package/"+u.name+"/index.html"}}const D=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];var z={cert:p.default.readFileSync(m.default.join(P,"./certs/cert.pem")),key:p.default.readFileSync(m.default.join(P,"./certs/key.pem")),passphrase:""};async function M(e,t){const{baseURI:o,extTypes:n,entryInfo:a,outputPath:r}=t,i=m.default.join(r,"build-result"),u={},s=n.map((e=>{const t={type:"HTML",content:{pages:[{path:R(e,a)}],baseURI:o}};return u[e]=t,{type:e,buildResult:{[e]:t}}}));if("development"===e){const e=s.map((e=>p.default.outputFile(m.default.join(i,e.type+".json"),JSON.stringify(e.buildResult,null,2))));await Promise.all(e)}return u}function R(e,t){let o=t.entryPath+`?extType=${e}`;return e.endsWith("_h5")&&(o+="&__module_busi__=kiwi-ExtSDK"),o}const C=e=>{const t=(()=>{const e=h.default.networkInterfaces(),t=x.default.flatten(x.default.values(e));return x.default.filter((e=>/(ipv)?4/gi.test(e.family)&&!/^127\./.test(e.address)),t)})();return t&&t.length>1&&(T.log(`检测到本机有多个 ip 地址:\n- ${t.map((e=>e.address)).join("\n- ")}`),T.log("请在 project.config.json 的 host 中指定正确的 ip"),process.exit(1)),t&&t.length<=0&&(T.log("未能找到本机 ip 地址, 本地开发 app 侧将无法加载小程序"),process.exit(1)),t[0]?.address},N=new Set(["web_video_com","app_panel_h5","zs_anchor_panel_h5","pc_anchor_panel","pc_panel"]);function K(e,t){const o={...t};return function(e){let t=[];e&&0!==e.length?e.forEach((e=>{N.has(e)||t.push(e)})):T.fatal("请在project.config.json相应地方填写supportExtTypes."),t.length>0&&T.fatal(`未支持的小程序类型:${t.join("|")}.`)}(t.supportExtTypes),function(e){null==e.hostId&&(e.hostId="huyaext")}(o),"development"===e&&function(e){e.https=!0,null==e.host&&(e.host=C()||""),null==e.port&&(e.port=18080)}(o),o}function O(e){return`${e.https?"https":"http"}://${e.host}:${e.port}/`}const J=new class{async build(e){const{inputPath:t,outputPath:o,publicPath:n,projectConfig:a,config:r,extUuid:i}=e,u=K("production",r);if(p.default.existsSync(o)&&p.default.removeSync(o),await p.default.copy(t,o,{overwrite:!0}),"game"==a.compileType){T.log("正在合并分包...");const e=F(o,{hostId:u.hostId,extUuid:i});return T.success("合并分包完成"),await M("production",{entryInfo:e,baseURI:n,extTypes:u.supportExtTypes,outputPath:o})}}async start(e){const{inputPath:t,projectConfig:o,outputPath:n,config:a}=e,r=n||m.default.join(__dirname,"../../temp"),i=K("development",a);if("game"==o.compileType){await k(t,r),T.log("正在合并分包...");const e=F(r,{hostId:i.hostId,extUuid:void 0});return T.success("合并分包完成"),T.log("启动 live server 服务..."),T.log("本地访问地址:",O(i)+e.entryPath+"?extType=web_video_com"),function(e){var t={port:e.port,host:e.host,root:e.root,open:!1,ignore:e.ignore,file:"index.html",wait:1e3,mount:e.mount,logLevel:1,https:z};j.default.start(t)}({...i,root:r}),await M("development",{entryInfo:e,baseURI:O(i),extTypes:i.supportExtTypes,outputPath:r})}}async release(e){const{contextPath:t,releasePath:n,projectConfig:a}=e;p.default.existsSync(n)&&p.default.removeSync(n);const r=a.projectName||a.projectname||"project",i=m.default.join(n,r);"game"==a.compileType?await k(t,i):await async function(e,t){I(),await o.compilerManager.init({projectPath:e,outputPath:t,cachePath:w}),await o.compilerManager.compileDev(),b(e,t)}(t,i);const u=m.default.join(n,r);var s;await(s=u,new Promise(((e,t)=>{const o=p.default.createWriteStream(`${s}.zip`),n=v.default("zip",{zlib:{level:9}});o.on("close",(()=>{const t=n.pointer();e({name:`${m.default.basename(s)}.zip`,size:t})})),n.on("warning",(e=>{if("ENOENT"!==e.code)throw e})),n.on("error",(e=>{throw t(e),e})),n.pipe(o),n.directory(`${s}`,!1),n.finalize()})))}config(){}providedProjectConfig(){}};module.exports=J,exports.default=J;
6
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("fs-extra"),e=require("path"),a=require("@revues/code-compiler"),n=require("os"),o=require("chalk"),i=require("util"),r=require("glob"),u=require("handlebars"),s=require("live-server"),l=require("archiver"),c=require("ramda");function d(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var f,p=d(t),m=d(e),h=d(n),y=d(o),g=d(u),j=d(s),x=d(l),P=d(c);!function(t){t[t.Integration=0]="Integration",t[t.Separate=1]="Separate"}(f||(f={}));const S=m.default.join(h.default.tmpdir(),".revue_cache"),v=f.Integration,w=m.default.resolve(__dirname,"../static"),b="project.config.json";function k(t,e){p.default.copyFileSync(m.default.join(t,b),m.default.join(e,b))}function _(){p.default.existsSync(S)||p.default.mkdirSync(S)}const I=y.default.gray("·");var E=(t=>{t=` ${t}`;return{log(...e){const a=i.format.apply(i.format,e);console.log(y.default.white(t),I,a)},fatal(...e){e[0]instanceof Error&&(e[0]=e[0].message.trim());const a=i.format.apply(i.format,e);console.error(y.default.red(t),I,a),process.exit(1)},success(...e){const a=i.format.apply(i.format,e);console.log(y.default.green(t),I,a)}}})("REVUE");async function U(t,e){_(),await a.compilerManager.init({projectPath:t,outputPath:e,cachePath:S}),await a.compilerManager.compileDev(),k(t,e)}async function T(t,e){_(),function(t){const e=m.default.join(t,"web-adapter.js"),a=require.resolve("@revues/cocos-web-adapter/dist/index.js");p.default.existsSync(e)?p.default.writeFileSync(e,p.default.readFileSync(a)):E.log("The web-adapter.js was not found from project root.")}(t),await a.compilerManager.init({projectPath:t,outputPath:e,cachePath:S}),await a.compilerManager.compileDev(),k(t,e)}const $={test:"//test-extsdk.msstatic.com",prod:"//extsdk-msstatic.cdn.huya.com"};function F(t){return`${$.prod}/sdk/$1/${t.hostId}/${t.extUuid||0}/sdk.js`}function q(t,e,a){const n=p.default.readFileSync(t).toString();p.default.outputFileSync(e,function(t,e,a){return g.default.compile(t,{noEscape:!0})(e,a)}(n,a))}function C(t,e){const n=m.default.join(t,"package"),o=function(t){const e=m.default.join(t,"packageConfig.json");return p.default.readJSONSync(e)}(n),i=o.findIndex((t=>{return(e=t).name===a.pkgFileType.MainPkg&&"."===e.root;var e}));if(-1===i)throw new Error("无法找到主包构建信息");const r=o[i];o.splice(i,1);const u=o;u.length>0&&function(t,e,a,n){const o=m.default.join(t,e.name);a.forEach((e=>{const a=m.default.join(t,e.name),i=m.default.join(a,e.root),r=m.default.join(o,e.root);n&&n(a,o,e),p.default.moveSync(i,r,{overwrite:!0}),p.default.removeSync(m.default.join(t,e.name))}))}(n,r,u,e);const s=m.default.join(w,"framework");if(v===f.Integration){p.default.copySync(s,m.default.join(t,"framework"));const e=m.default.join(t,"sdk");p.default.mkdirSync(e),D(e,"@revues/web-sdk-core"),D(e,"@revues/web-frame")}return{mainPakConf:r,packagePath:n}}function D(t,e){const a=require.resolve(e);let n=m.default.join(a,"../");"dist"===m.default.basename(n)?p.default.copySync(n,t):(n=m.default.resolve(n,"../"),n=m.default.join(n,"dist"),p.default.existsSync(n)?p.default.copySync(n,t):E.log(`Builder can't resolve ${e} entry from ${a}`))}function z(t,e){const{mainPakConf:a,packagePath:n}=C(t),o=m.default.join(w,"template"),i=m.default.join(n,a.name);return function(t){const{mainPath:e,sourcePathPrefix:a,templatePath:n,hyextSDKUrl:o}=t,i={sourcePathPrefix:a,hyextSDKUrl:o},r=[{input:m.default.join(n,"game-frame.hbs"),output:m.default.join(e,"game-frame.html"),data:i},{input:m.default.join(n,"minigame-page-manager.hbs"),output:m.default.join(e,"index.html"),data:i}];r.forEach((t=>{q(t.input,t.output,t.data)}))}({hyextSDKUrl:F({hostId:e.hostId,extUuid:e.extUuid}),sourcePathPrefix:v===f.Integration?m.default.relative(i,t):"",templatePath:o,mainPath:i}),function(t){const e=r.sync("**/**.wasm",{cwd:t,ignore:K,nodir:!0,absolute:!1});console.log("transform wasm to base64 files: \n",e),e.forEach((e=>{const a=m.default.join(t,e),n=p.default.readFileSync(a).toString("base64");p.default.outputFileSync(a+".txt",n)}))}(i),{mainPath:i,main:a,entryPath:"package/"+a.name+"/index.html"}}const K=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];function M(t,e,a){const n=a.name+".js",o=a.name+".js.map",i=m.default.join(t,n),r=m.default.join(t,o);p.default.existsSync(i)&&p.default.outputFileSync(m.default.join(e,n),p.default.readFileSync(i)),p.default.existsSync(r)&&p.default.outputFileSync(m.default.join(e,o),p.default.readFileSync(r))}function N(t,e){const{mainPakConf:a,packagePath:n}=C(t,M),o=function(t){const e=m.default.join(t,"packageExtConfig.json");return p.default.readJSONSync(e)}(n),i=m.default.join(w,"template"),r=m.default.join(n,a.name);return function(t){const{mainPath:e,sourcePathPrefix:a,templatePath:n,hyextSDKUrl:o,packageExtConfig:i}=t,r={sourcePathPrefix:a,hyextSDKUrl:o,packageExtConfig:JSON.stringify(i)},u=[{input:m.default.join(n,"miniapp-page-manager.hbs"),output:m.default.join(e,"index.html"),data:r},{input:m.default.join(n,"service.hbs"),output:m.default.join(e,"service.html"),data:r}];u.forEach((t=>{q(t.input,t.output,t.data)}))}({hyextSDKUrl:F({hostId:e.hostId,extUuid:e.extUuid}),sourcePathPrefix:v===f.Integration?m.default.relative(r,t):"",packageExtConfig:o,templatePath:i,mainPath:r}),{mainPath:r,main:a,entryPath:"package/"+a.name+"/index.html"}}var R={cert:p.default.readFileSync(m.default.join(w,"./certs/cert.pem")),key:p.default.readFileSync(m.default.join(w,"./certs/key.pem")),passphrase:""};async function O(t,e){const{baseURI:a,extTypes:n,entryInfo:o,outputPath:i}=e,r=m.default.join(i,"build-result"),u={},s=n.map((t=>{const e={type:"HTML",content:{pages:[{path:J(t,o)}],baseURI:a}};return u[t]=e,{type:t,buildResult:{[t]:e}}}));if("development"===t){const t=s.map((t=>p.default.outputFile(m.default.join(r,t.type+".json"),JSON.stringify(t.buildResult,null,2))));await Promise.all(t)}return u}function J(t,e){let a=e.entryPath+`?extType=${t}`;return t.endsWith("_h5")&&(a+="&__module_busi__=kiwi-ExtSDK"),a}const L=t=>{const e=(()=>{const t=h.default.networkInterfaces(),e=P.default.flatten(P.default.values(t));return P.default.filter((t=>/(ipv)?4/gi.test(t.family)&&!/^127\./.test(t.address)),e)})();return e&&e.length>1&&(E.log(`检测到本机有多个 ip 地址:\n- ${e.map((t=>t.address)).join("\n- ")}`),E.log("请在 project.config.json 的 host 中指定正确的 ip"),process.exit(1)),e&&e.length<=0&&(E.log("未能找到本机 ip 地址, 本地开发 app 侧将无法加载小程序"),process.exit(1)),e[0]?.address},W=new Set(["web_video_com","app_panel_h5","zs_anchor_panel_h5","pc_anchor_panel","pc_panel"]);function B(t,e){const a={...e};return function(t){let e=[];t&&0!==t.length?t.forEach((t=>{W.has(t)||e.push(t)})):E.fatal("请在project.config.json相应地方填写supportExtTypes."),e.length>0&&E.fatal(`未支持的小程序类型:${e.join("|")}.`)}(e.supportExtTypes),function(t){null==t.hostId&&(t.hostId="huyaext")}(a),"development"===t&&function(t){t.https=!0,null==t.host&&(t.host=L()||""),null==t.port&&(t.port=18080)}(a),a}function H(t){return`${t.https?"https":"http"}://${t.host}:${t.port}/`}function V(t,e,a){E.log("正在合并分包...");const n=("game"==t.compileType?z:N)(e,a);return E.success("合并分包完成"),n}const A=new class{async build(t){const{inputPath:e,outputPath:a,publicPath:n,projectConfig:o,config:i,extUuid:r}=t,u=B("production",i);p.default.existsSync(a)&&p.default.removeSync(a),await p.default.copy(e,a,{overwrite:!0});const s=V(o,a,{hostId:u.hostId,extUuid:r});return await O("production",{entryInfo:s,baseURI:n,extTypes:u.supportExtTypes,outputPath:a})}async start(t){const{inputPath:e,projectConfig:a,outputPath:n,config:o}=t,i=n||m.default.join(__dirname,"../../temp"),r=B("development",o);"game"==a.compileType?await T(e,i):await U(e,i);const u=V(a,i,{hostId:r.hostId,extUuid:void 0});return E.log("启动 live server 服务..."),E.success("本地访问地址:",H(r)+u.entryPath+"?extType=web_video_com"),function(t){var e={port:t.port,host:t.host,root:t.root,open:!1,ignore:t.ignore,file:"index.html",wait:1e3,mount:t.mount,logLevel:1,https:R};j.default.start(e)}({...r,root:i}),await O("development",{entryInfo:u,baseURI:H(r),extTypes:r.supportExtTypes,outputPath:i})}async release(t){const{contextPath:e,releasePath:a,projectConfig:n}=t;p.default.existsSync(a)&&p.default.removeSync(a);const o=n.projectName||n.projectname||"project",i=m.default.join(a,o);"game"==n.compileType?await T(e,i):await U(e,i);const r=m.default.join(a,o);var u;await(u=r,new Promise(((t,e)=>{const a=p.default.createWriteStream(`${u}.zip`),n=x.default("zip",{zlib:{level:9}});a.on("close",(()=>{const e=n.pointer();t({name:`${m.default.basename(u)}.zip`,size:e})})),n.on("warning",(t=>{if("ENOENT"!==t.code)throw t})),n.on("error",(t=>{throw e(t),t})),n.pipe(a),n.directory(`${u}`,!1),n.finalize()})))}config(){}providedProjectConfig(){}};module.exports=A,exports.default=A;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyext/builder-revues",
3
- "version": "0.0.1-beta.7",
3
+ "version": "0.0.1-beta.9",
4
4
  "description": "> TODO: description",
5
5
  "author": "diamondloler <857276958@qq.com>",
6
6
  "homepage": "",
@@ -22,9 +22,10 @@
22
22
  },
23
23
  "scripts": {},
24
24
  "dependencies": {
25
- "@revues/cocos-web-adapter": "0.0.1-beta.7",
26
- "@revues/code-compiler": "0.0.1-beta.7",
27
- "@revues/web-sdk-core": "0.0.1-beta.7",
25
+ "@revues/cocos-web-adapter": "0.0.1-beta.9",
26
+ "@revues/code-compiler": "0.0.1-beta.9",
27
+ "@revues/web-frame": "0.0.1-beta.9",
28
+ "@revues/web-sdk-core": "0.0.1-beta.9",
28
29
  "archiver": "^7.0.1",
29
30
  "chalk": "^2.4.2",
30
31
  "fs-extra": "8.1.0",
@@ -39,5 +40,5 @@
39
40
  "@types/live-server": "^1.2.3",
40
41
  "@types/ramda": "^0.29.11"
41
42
  },
42
- "gitHead": "925db5afe414cc3c21ab7f417c67b2179945827b"
43
+ "gitHead": "9ea152ecbbf8e5a4805f3c5e2054eb3aa7c00e12"
43
44
  }
Binary file
@@ -18,6 +18,7 @@
18
18
  touch-callout:none;
19
19
  -webkit-touch-callout:none;
20
20
  background-color: #000;
21
+ overscroll-behavior: none;
21
22
  }
22
23
 
23
24
  canvas {
@@ -3,10 +3,28 @@
3
3
 
4
4
  <head>
5
5
  <meta charset="UTF-8" />
6
- <meta id="viewport" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
6
+ <meta id="viewport" name="viewport"
7
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
7
8
  <meta name="content-type" content="text/html; charset=utf-8">
8
9
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
10
  <style>
11
+ html,
12
+ body {
13
+ position: relative;
14
+ width: 100%;
15
+ height: 100%;
16
+ }
17
+
18
+ .views {
19
+ display: flex;
20
+ position: relative;
21
+ width: 100%;
22
+ flex-grow: 1;
23
+ background: #fefefe;
24
+ flex: 1;
25
+ z-index: 0;
26
+ }
27
+
10
28
  .service,
11
29
  .service-preload,
12
30
  .views>.worker {
@@ -17,16 +35,29 @@
17
35
  height: 1px;
18
36
  opacity: 0;
19
37
  }
38
+
20
39
  .views>.webview {
21
40
  position: absolute;
22
41
  width: 100%;
23
42
  height: 100%;
24
43
  }
44
+
45
+ body {
46
+ color: #333;
47
+ display: flex;
48
+ overscroll-behavior: none;
49
+ flex-direction: column;
50
+ margin: 0;
51
+ padding: 0;
52
+ box-sizing: border-box;
53
+ }
25
54
  </style>
55
+ <link rel='stylesheet' href='{{sourcePathPrefix}}/sdk/web-frame.css'>
26
56
  <script charset="utf-8">
27
- window.packageExtConfig = {{packageExtConfig}}
57
+ window.__packageExtConfig = {{ packageExtConfig }}
28
58
  </script>
29
59
  <script charset="utf-8" src="{{sourcePathPrefix}}/sdk/web-sdk-core.js"></script>
60
+ <script charset="utf-8" src="{{sourcePathPrefix}}/sdk/web-frame.js"></script>
30
61
  </head>
31
62
 
32
63
  <body>
@@ -17,24 +17,26 @@
17
17
  height: 1px;
18
18
  opacity: 0;
19
19
  }
20
-
21
20
  .views>.webview {
22
21
  position: absolute;
23
22
  width: 100%;
24
23
  height: 100%;
25
24
  }
26
-
27
25
  .service.service-view {
28
26
  width: 100%;
29
27
  height: 100%;
30
28
  opacity: 1;
31
29
  z-index: 10;
32
30
  }
31
+ body {
32
+ overscroll-behavior: none;
33
+ }
33
34
  </style>
34
35
  <script charset="utf-8">
35
36
  window.__sdkUrlTemplate = "{{hyextSDKUrl}}"
36
37
  </script>
37
38
  <script charset="utf-8" src="{{sourcePathPrefix}}/sdk/web-sdk-core.js"></script>
39
+ <script charset="utf-8" src="{{sourcePathPrefix}}/sdk/web-frame.js"></script>
38
40
  </head>
39
41
 
40
42
  <body>
@@ -0,0 +1,28 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html>
4
+ <head>
5
+ <meta name="content-type" content="text/html; charset=utf-8">
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <script>
8
+ var __wxAppData = {}
9
+ var __wxRoute
10
+ var __wxRouteBegin
11
+ var __eval = eval
12
+ var __AppCode__ = {}
13
+ var global = {}
14
+ var $gfc
15
+ </script>
16
+ <script charset="utf-8" src="{{sourcePathPrefix}}/framework/script/service.js" type="text/javascript"></script>
17
+ <script charset="utf-8" src="pageframe.js"></script>
18
+ <script charset="utf-8" src="__APP__.js"></script>
19
+ </head>
20
+ <body>
21
+ <script charset="UTF-8">
22
+ ServiceJSBridge.publish('serviceReady', __wxConfig__, [100000]);
23
+ </script>
24
+ </body>
25
+
26
+ </html>
27
+
28
+