126 lines
3.2 KiB
Plaintext
126 lines
3.2 KiB
Plaintext
<!--packageE/community_buying/business_info/business_info.wxml-->
|
|
<view change:themeColor="{{themeTool.changeThemeColor}}"
|
|
themeColor="{{themeColor}}"
|
|
></view>
|
|
<import src="../../../wxParse/wxParse.wxml" />
|
|
<view class="header">
|
|
<view class="container themeDiyBackground">
|
|
<view class="face">
|
|
<image src="{{deliver.avatar}}"></image>
|
|
</view>
|
|
<view class="desc">
|
|
<view class="name">{{deliver.deliver_name}}</view>
|
|
<view class="region">
|
|
<text class="iconfont icon-fontclass-dizhi"></text>
|
|
<text>{{deliver.address}}</text>
|
|
</view>
|
|
<view class="address">提货地址:{{deliver.full_address}}</view>
|
|
</view>
|
|
<view class="buyInfo themeDiyColor" bindtap="back">团购商品</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="notice">
|
|
<text class="iconfont icon-fontclass-gonggao themeDiyColor"></text>
|
|
<view class="notice-main">
|
|
<!-- <rich-text nodes="{{group.description}}"></rich-text> -->
|
|
<block wx:if="{{article.nodes}}">
|
|
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
|
|
</block>
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="wrapper">
|
|
<block wx:if="{{deliver.aptitute.length>0}}">
|
|
<view class="h2">
|
|
<text class="iconfont icon-fontclass-zhizhao themeDiyColor"></text>
|
|
<text class="name">资质</text>
|
|
</view>
|
|
<view class="quality">
|
|
<image wx:for="{{deliver.aptitute}}" src="{{item}}"></image>
|
|
</view>
|
|
</block>
|
|
<block wx:if="{{deliver.thumb.length>0}}">
|
|
<view class="h2 h2-business">
|
|
<text class="iconfont icon-business icon-fontclass-shengchengjilu themeDiyColor"></text>
|
|
<text class="name">商家图片</text>
|
|
</view>
|
|
<view class="business">
|
|
<image wx:for="{{deliver.thumb}}" src="{{item}}"></image>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
|
|
|
|
<wxs module="themeTool">
|
|
var color="";
|
|
function setDiyBackground(nodes){
|
|
for(var i=0;i<nodes.length;i++){
|
|
if(nodes[i]){
|
|
nodes[i].setStyle({
|
|
"background":color
|
|
})
|
|
}
|
|
}
|
|
}
|
|
function setDiyColor(nodes){
|
|
console.log("nodes",nodes.length)
|
|
for(var i=0;i<nodes.length;i++){
|
|
if(nodes[i]){
|
|
nodes[i].setStyle({
|
|
"color":color
|
|
})
|
|
}
|
|
}
|
|
}
|
|
function setDiyBorder(nodes){
|
|
for(var i=0;i<nodes.length;i++){
|
|
if(nodes[i]){
|
|
nodes[i].setStyle({
|
|
"border-color":color
|
|
})
|
|
}
|
|
}
|
|
}
|
|
function setComponentsColor(nodes){
|
|
for(var i=0;i<nodes.length;i++){
|
|
if(nodes[i]){
|
|
selectedTypeNodes(nodes[i])
|
|
}
|
|
}
|
|
}
|
|
function selectedTypeNodes(nodes){
|
|
nodes.setStyle({"--themeColor":color})
|
|
var componentsThemeColor = nodes.selectAllComponents('.componentsThemeColor');
|
|
if(componentsThemeColor.length>0){
|
|
setComponentsColor(componentsThemeColor);
|
|
}
|
|
//var themeDiyBackground = nodes.selectAllComponents('.themeDiyBackground');
|
|
//console.log("themeDiyColor",themeDiyBackground.length);
|
|
//setDiyBackground(themeDiyBackground);
|
|
|
|
// var themeDiyColor = nodes.selectAllComponents('.themeDiyColor');
|
|
// setDiyColor(themeDiyColor);
|
|
|
|
// var themeDiyBorder = nodes.selectAllComponents('.themeDiyBorder');
|
|
// setDiyBorder(themeDiyBorder);
|
|
|
|
|
|
}
|
|
function changeThemeColor(newValue, oldValue, ownerInstance, instance){
|
|
color = newValue;
|
|
ownerInstance.setStyle({"--themeColor":color})
|
|
// selectedTypeNodes(ownerInstance);
|
|
}
|
|
|
|
module.exports ={
|
|
changeThemeColor:changeThemeColor
|
|
}
|
|
</wxs>
|
|
|
|
|
|
|
|
|
|
|