浏览代码

跟换图片路径

release
GL 4 年前
父节点
当前提交
6db09b2ff9
共有 3 个文件被更改,包括 12 次插入5 次删除
  1. +3
    -1
      components/banner/index.js
  2. +8
    -3
      project.config.json
  3. +1
    -1
      utils/imgurl.js

+ 3
- 1
components/banner/index.js 查看文件

@@ -24,11 +24,13 @@ Component({
*/
methods: {
gotobannerdetail: function(e) {
console.log(this.data.list)
if (e.currentTarget.dataset.data.type == 3) {
// 小程序路径
let indexOf = (e.currentTarget.dataset.data.pagePath).indexOf("=");
console.log(indexOf, "123")
let id = (e.currentTarget.dataset.data.pagePath).substring(indexOf);
let type = (e.currentTarget.dataset.data.pagePath).substr(23,2)
let type = (e.currentTarget.dataset.data.pagePath).substr(indexOf + 1, 2)// 2020/7/22 变量获取pagePath中的type
console.log(indexOf, id, type);
console.log(e.currentTarget.dataset.data.pagePath)
if(type == 'cd' || type == 'sd'){


+ 8
- 3
project.config.json 查看文件

@@ -4,16 +4,18 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
@@ -22,7 +24,10 @@
"disablePlugins": [],
"outputPath": ""
},
"useCompilerModule": false,
"preloadBackgroundData": false,
"compileHotReLoad": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false
},
"compileType": "miniprogram",


+ 1
- 1
utils/imgurl.js 查看文件

@@ -1,4 +1,4 @@
const baseUrl = 'https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/'
const baseUrl = 'https://formall.oss-accelerate.aliyuncs.com/cimg/'
module.exports = {
'act': {
'url': baseUrl + 'act.png',


正在加载...
取消
保存