0806
This commit is contained in:
parent
c2ed1e14f2
commit
c694c70373
@ -234,13 +234,14 @@ Page({
|
|||||||
} else {
|
} else {
|
||||||
area[i]['templateAreaFontStyle'] = 'italic'
|
area[i]['templateAreaFontStyle'] = 'italic'
|
||||||
}
|
}
|
||||||
if (area[i].templateAreaServerLink == '1') {
|
// if (area[i].templateAreaServerLink == '1') {
|
||||||
if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) {
|
// if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) {
|
||||||
area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1)
|
// area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
area[i].templateAreaFontSize = Math.floor(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx'
|
area[i].templateAreaFontSize = Math.floor(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx'
|
||||||
}
|
}
|
||||||
|
console.log(area)
|
||||||
self.setData({
|
self.setData({
|
||||||
cardInfo: res.data,
|
cardInfo: res.data,
|
||||||
areaList: area
|
areaList: area
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<!-- 其他 -->
|
<!-- 其他 -->
|
||||||
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" bindtap="giveFocus"
|
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" bindtap="giveFocus"
|
||||||
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}}"
|
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.picturesTemplateHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.picturesTemplateWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.picturesTemplateWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.picturesTemplateHeight) * 100 + '%'}}"
|
||||||
wx:if="{{item.templateAreaServerLink != '1' && item.templateAreaServerLink != '2'}}">
|
wx:if="{{item.templateAreaType == '1' && item.templateAreaServerLink == '1'}}">
|
||||||
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
|
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
|
||||||
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
|
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
|
||||||
<!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> -->
|
<!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> -->
|
||||||
@ -39,9 +39,9 @@
|
|||||||
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
|
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
|
||||||
<view class="item-title">{{item.templateAreaName}}:</view>
|
<view class="item-title">{{item.templateAreaName}}:</view>
|
||||||
<view class="item-input">
|
<view class="item-input">
|
||||||
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo"
|
<input type="text" bindinput="editInfo"
|
||||||
data-num="{{index}}" bindblur="getFileId" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
data-num="{{index}}" bindblur="getFileId" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
||||||
wx:if="{{item.templateAreaServerLink != '1'}}" maxlength="{{item.templateAreaFontLength}}"></input>
|
wx:if="{{item.templateAreaServerLink != '1'}}"></input>
|
||||||
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo"
|
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo"
|
||||||
data-num="{{index}}" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
data-num="{{index}}" value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
|
||||||
maxlength="{{item.templateAreaFontLength}}" wx:else></input>
|
maxlength="{{item.templateAreaFontLength}}" wx:else></input>
|
||||||
|
@ -212,11 +212,11 @@ Page({
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
var area = res.data.areaList
|
var area = res.data.areaList
|
||||||
for (let i = 0; i < area.length; i ++) {
|
for (let i = 0; i < area.length; i ++) {
|
||||||
if (area[i].templateAreaServerLink == '1') {
|
// if (area[i].templateAreaServerLink == '1') {
|
||||||
if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) {
|
// if (area[i].templateAreaFontValue.length > area[i].templateAreaFontLength) {
|
||||||
area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1)
|
// area[i].templateAreaFontValue = area[i].templateAreaFontValue.substring(area[i].templateAreaFontLength, -1)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
area[i].templateAreaFontSize = Math.floor(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx'
|
area[i].templateAreaFontSize = Math.floor(area[i].templateAreaFontSize * 750 / wx.getSystemInfoSync().windowWidth) + 'rpx'
|
||||||
if (area[i].templateAreaFontCenter == '1') {
|
if (area[i].templateAreaFontCenter == '1') {
|
||||||
area[i].templateAreaFontCenter = 'left'
|
area[i].templateAreaFontCenter = 'left'
|
||||||
|
@ -1,73 +1,73 @@
|
|||||||
{
|
{
|
||||||
"description": "项目配置文件",
|
"description": "项目配置文件",
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
"ignore": []
|
"ignore": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"urlCheck": true,
|
||||||
|
"es6": true,
|
||||||
|
"enhance": false,
|
||||||
|
"postcss": true,
|
||||||
|
"preloadBackgroundData": false,
|
||||||
|
"minified": true,
|
||||||
|
"newFeature": false,
|
||||||
|
"coverView": true,
|
||||||
|
"nodeModules": false,
|
||||||
|
"autoAudits": false,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"scopeDataCheck": false,
|
||||||
|
"uglifyFileName": false,
|
||||||
|
"checkInvalidKey": true,
|
||||||
|
"checkSiteMap": true,
|
||||||
|
"uploadWithSourceMap": true,
|
||||||
|
"compileHotReLoad": false,
|
||||||
|
"useMultiFrameRuntime": true,
|
||||||
|
"useApiHook": true,
|
||||||
|
"useApiHostProcess": false,
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
"setting": {
|
"enableEngineNative": false,
|
||||||
"urlCheck": true,
|
"useIsolateContext": true,
|
||||||
"es6": true,
|
"userConfirmedBundleSwitch": false,
|
||||||
"enhance": false,
|
"packNpmManually": false,
|
||||||
"postcss": true,
|
"packNpmRelationList": [],
|
||||||
"preloadBackgroundData": false,
|
"minifyWXSS": true,
|
||||||
"minified": true,
|
"showES6CompileOption": false
|
||||||
"newFeature": false,
|
},
|
||||||
"coverView": true,
|
"compileType": "miniprogram",
|
||||||
"nodeModules": false,
|
"libVersion": "2.17.0",
|
||||||
"autoAudits": false,
|
"appid": "wxe17874894f7ff27b",
|
||||||
"showShadowRootInWxmlPanel": true,
|
"projectname": "card",
|
||||||
"scopeDataCheck": false,
|
"debugOptions": {
|
||||||
"uglifyFileName": false,
|
"hidedInDevtools": []
|
||||||
"checkInvalidKey": true,
|
},
|
||||||
"checkSiteMap": true,
|
"scripts": {},
|
||||||
"uploadWithSourceMap": true,
|
"staticServerOptions": {
|
||||||
"compileHotReLoad": false,
|
"baseURL": "",
|
||||||
"useMultiFrameRuntime": true,
|
"servePath": ""
|
||||||
"useApiHook": true,
|
},
|
||||||
"useApiHostProcess": false,
|
"isGameTourist": false,
|
||||||
"babelSetting": {
|
"condition": {
|
||||||
"ignore": [],
|
"search": {
|
||||||
"disablePlugins": [],
|
"list": []
|
||||||
"outputPath": ""
|
|
||||||
},
|
|
||||||
"enableEngineNative": false,
|
|
||||||
"useIsolateContext": true,
|
|
||||||
"userConfirmedBundleSwitch": false,
|
|
||||||
"packNpmManually": false,
|
|
||||||
"packNpmRelationList": [],
|
|
||||||
"minifyWXSS": true,
|
|
||||||
"showES6CompileOption": false
|
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"conversation": {
|
||||||
"libVersion": "2.17.0",
|
"list": []
|
||||||
"appid": "wxe17874894f7ff27b",
|
|
||||||
"projectname": "card",
|
|
||||||
"debugOptions": {
|
|
||||||
"hidedInDevtools": []
|
|
||||||
},
|
},
|
||||||
"scripts": {},
|
"game": {
|
||||||
"staticServerOptions": {
|
"list": []
|
||||||
"baseURL": "",
|
|
||||||
"servePath": ""
|
|
||||||
},
|
},
|
||||||
"isGameTourist": false,
|
"plugin": {
|
||||||
"condition": {
|
"list": []
|
||||||
"search": {
|
},
|
||||||
"list": []
|
"gamePlugin": {
|
||||||
},
|
"list": []
|
||||||
"conversation": {
|
},
|
||||||
"list": []
|
"miniprogram": {
|
||||||
},
|
"list": []
|
||||||
"game": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"plugin": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"gamePlugin": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"miniprogram": {
|
|
||||||
"list": []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user