Commit eb4ebd13 by huahua

提交

parent 15df9d8e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
onLaunch: function() { onLaunch: function() {
//字体列表 //字体列表
homeservice.queryList({ /*homeservice.queryList({
s: 'Material.fontFamilyList' s: 'Material.fontFamilyList'
}).then(result => { }).then(result => {
result.forEach(item=>{ result.forEach(item=>{
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
}) })
}).catch(err => { }).catch(err => {
}); }); */
}, },
onShow: function() { onShow: function() {
//调用监听网络状态的方法 //调用监听网络状态的方法
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<view class='item-box-in' style="text-align: center;" :style="{transform: 'rotate(' + item.angle + 'deg)', width: item.width + 'px',height: item.height + 'px', <view class='item-box-in' style="text-align: center;" :style="{transform: 'rotate(' + item.angle + 'deg)', width: item.width + 'px',height: item.height + 'px',
'line-height': item.height + 'px', 'background-color': item.under_color}"> 'line-height': item.height + 'px', 'background-color': item.under_color}">
<view :id="'item-text-' + idx " class="item-text" <view :id="'item-text-' + idx " class="item-text"
style="margin:auto;white-space:nowrap;display:table;" style="margin:auto;white-space:pre;display:table;"
:style="{'font-family': item.font_family,'font-weight': item.font_style,'font-size': item.font_size + 'px', color:item.font_color,'background-color': item.under_color}"> :style="{'font-family': item.font_family,'font-weight': item.font_style,'font-size': item.font_size + 'px', color:item.font_color,'background-color': item.under_color}">
{{item.content}} {{item.content}}
</view> </view>
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
<view id="item-text" class="item-text" :style="{'font-weight': data.itemList[data.cidx].font_style , <view id="item-text" class="item-text" :style="{'font-weight': data.itemList[data.cidx].font_style ,
'font-size': data.itemList[data.cidx].font_size+ 'px',color:data.itemList[data.cidx].font_color, 'font-size': data.itemList[data.cidx].font_size+ 'px',color:data.itemList[data.cidx].font_color,
'background-color': data.itemList[data.cidx].under_color,'font-family': data.itemList[data.cidx].font_family }" 'background-color': data.itemList[data.cidx].under_color,'font-family': data.itemList[data.cidx].font_family }"
style="margin:auto;white-space:nowrap;display:table;">{{data.itemList[data.cidx].content}} style="margin:auto;white-space:pre;display:table;">{{data.itemList[data.cidx].content}}
</view> </view>
</view> </view>
<image :src="upLoadImageUrl" mode="scaleToFill" @load="upLoadIImageLoad" @error="upLoadIImageLoadErr"></image> <image :src="upLoadImageUrl" mode="scaleToFill" @load="upLoadIImageLoad" @error="upLoadIImageLoadErr"></image>
...@@ -292,9 +292,9 @@ ...@@ -292,9 +292,9 @@
<image class="tool_li_img" src="../../static/icon_make_diy_uplaod_image.png" mode=""></image> <image class="tool_li_img" src="../../static/icon_make_diy_uplaod_image.png" mode=""></image>
<view class="tool_li_text">背景底色</view> <view class="tool_li_text">背景底色</view>
</view> </view>
<view class="tool_li" @click="showone = !showone" v-if=" is_photo == 1"> <view class="tool_li" @click="showone = !showone" v-if=" is_photo == 1" style="margin-bottom: 20upx;" >
<image @click="cancel('share')" class="tool_li_img" <image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""></image> src="../../static/icon_make_diy_back_color.png" mode="" style="width: 74upx; height: 70upx;"></image>
<view @click="cancel()" class="tool_li_text">上传相片</view> <view @click="cancel()" class="tool_li_text">上传相片</view>
</view> </view>
<view class="tool_li" @click="showPopup(3)" v-if="is_photo == 1"> <view class="tool_li" @click="showPopup(3)" v-if="is_photo == 1">
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
</view> </view>
<!-- 替换选项 --> <!-- 替换选项 -->
<!-- 字体 -->
<uni-popup ref="textsettingsshare" type="bottom" @change="change" style="position: fixed; z-index: 9999;"> <uni-popup ref="textsettingsshare" type="bottom" @change="change" style="position: fixed; z-index: 9999;">
<view class="uni-share" style="width: 100%; height: 600upx;background: #292933;" <view class="uni-share" style="width: 100%; height: 600upx;background: #292933;"
v-if="e_active == 3 || e_active == 4"> v-if="e_active == 3 || e_active == 4">
...@@ -408,14 +408,14 @@ ...@@ -408,14 +408,14 @@
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 --> <!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup ref="showshare" :type="type" @change="change" <uni-popup ref="showshare" :type="type" @change="change"
style="position: relative; z-index: 9999; width: 100%;" :style="{height: data.windowHeight +'px'}"> style="position: relative; z-index: 9998; width: 100%;" :style="{height: data.windowHeight +'px'}">
<!-- 文本 --> <!-- 文本 -->
<view class="uni-share full-width" :style="{height: data.windowHeight +'px'}" <view class="uni-share full-width" :style="{height: data.windowHeight +'px'}" style="z-index: 9999;"
v-if="e_active == 3 || e_active == 4"> v-if="e_active == 3 || e_active == 4">
<view <view
style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 9995; opacity: 0.8;" style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 997; opacity: 0.8;"
@click="cancel('share')"></view> @click="cancel('share')"></view>
<view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 25%; z-index: 9996;"> <view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 20%; z-index: 999;">
<textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor" <textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor"
@workweight="workweight" @bgtextcolor="bgtextcolor" @typefaceClick="typefaceClick" @workweight="workweight" @bgtextcolor="bgtextcolor" @typefaceClick="typefaceClick"
@typefaceshow="typefaceshow" ref="textsettings"> @typefaceshow="typefaceshow" ref="textsettings">
...@@ -423,6 +423,7 @@ ...@@ -423,6 +423,7 @@
</view> </view>
</view> </view>
<!-- 贴图/模板形状 --> <!-- 贴图/模板形状 -->
<view v-if="e_active == 2 || e_active == 23 || e_active == 99 || e_active == 24" <view v-if="e_active == 2 || e_active == 23 || e_active == 99 || e_active == 24"
class="uni-share full-width" :style="{height: data.windowHeight +'px'}"> class="uni-share full-width" :style="{height: data.windowHeight +'px'}">
...@@ -523,7 +524,7 @@ ...@@ -523,7 +524,7 @@
<!-- Ai转换 --> <!-- Ai转换 -->
<uni-popup ref="showAiChange" type="center" style="position: fixed; z-index: 9999; "> <uni-popup ref="showAiChange" type="center" style="position: fixed; z-index: 9999; ">
<view style="height: 950upx;border-radius:20upx; background: #fff;width: 600upx;"> <view style="height: 1000upx;border-radius:20upx; background: #fff;width: 600upx;">
<image src="../../static/img/icon_close_image.png" style="width: 30upx; <image src="../../static/img/icon_close_image.png" style="width: 30upx;
padding: 30upx; padding: 30upx;
position: absolute; position: absolute;
...@@ -531,7 +532,7 @@ ...@@ -531,7 +532,7 @@
top:0; top:0;
z-index: 999;" mode="widthFix" @click="showAiChangeClose()"> z-index: 999;" mode="widthFix" @click="showAiChangeClose()">
</image> </image>
<view style="height: 360upx; padding-top: 80upx;width: 100%; <view style="height: 240upx; padding-top: 80upx;width: 100%;
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -539,17 +540,17 @@ ...@@ -539,17 +540,17 @@
<view style="align-items: center;"> <view style="align-items: center;">
<image style="width:160upx;height:160upx;" src="../../static/icon_diy_anime_style.png" <image style="width:160upx;height:160upx;" src="../../static/icon_diy_anime_style.png"
@click="showAiChangeType(1)"></image> @click="showAiChangeType(1)"></image>
<view style="width:160upx;height:160upx;text-align: center;line-height: 160upx;">动漫风格 <view style="width:160upx;height:130upx;text-align: center;line-height: 130upx;">动漫风格
</view> </view>
</view> </view>
<view style="align-items: center;margin-left: 100upx;"> <view style="align-items: center;margin-left: 100upx;">
<image style="width:160upx;height:160upx; " src="../../static/icon_diy_sketch_style.png" <image style="width:160upx;height:160upx; " src="../../static/icon_diy_sketch_style.png"
@click="showAiChangeType(2)"></image> @click="showAiChangeType(2)"></image>
<view style="width:160upx;height:160upx;text-align: center;line-height: 160upx;">素描风格 <view style="width:160upx;height:130upx;text-align: center;line-height: 130upx;">素描风格
</view> </view>
</view> </view>
</view> </view>
<view style="height: 360upx; padding-top: 40upx;width: 100%; <view style="height: 240upx; padding-top: 40upx;width: 100%;
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -557,15 +558,30 @@ ...@@ -557,15 +558,30 @@
<view style="align-items: center;margin-left: 20upx;"> <view style="align-items: center;margin-left: 20upx;">
<image style="width:160upx;height:160upx; " src="../../static/icon_diy_matting_style.png" <image style="width:160upx;height:160upx; " src="../../static/icon_diy_matting_style.png"
@click="showAiChangeType(3)"></image> @click="showAiChangeType(3)"></image>
<view style="width:160upx;height:160upx;text-align: center;line-height: 160upx;">人像抠图</view> <view style="width:160upx;height:130upx;text-align: center;line-height: 130upx;">人像抠图</view>
</view> </view>
<view style="align-items: center;margin-left: 100upx;"> <view style="align-items: center;margin-left: 100upx;">
<image style="width:160upx;height:160upx; " src="../../static/icon_diy_enhance_style.png" <image style="width:160upx;height:160upx; " src="../../static/icon_diy_enhance_style.png"
@click="showAiChangeType(4)"></image> @click="showAiChangeType(4)"></image>
<view style="width:160upx;height:160upx;text-align: center;line-height: 160upx;">色彩增强</view> <view style="width:160upx;height:130upx;text-align: center;line-height: 130upx;">色彩增强</view>
</view> </view>
</view> </view>
<view style="font-size: 30upx;color:#333; width:100%;text-align: center;margin: auto;">选中的图片必须带有清晰人物头像</view> <view style="height: 240upx; padding-top: 40upx;width: 100%;
align-items: center;
display: flex;
flex-direction: row;
justify-content: center;">
<view style="align-items: center;margin-left: 20upx; width: 50%;">
<image style="width:160upx;height:160upx; margin: auto;"
src="../../static/icon_diy_matting_style.png" @click="showAiChangeType(5)"></image>
<view style="height:130upx;text-align: center;line-height: 130upx;">色彩超分</view>
</view>
<view style="align-items: center;margin-left: 20upx; width: 50%;">
</view>
</view>
<view style="font-size: 30upx;color:#333; width:100%;text-align: center;margin: auto;">
选中的图片必须带有清晰人物头像</view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -1170,7 +1186,15 @@ ...@@ -1170,7 +1186,15 @@
}); });
} else { } else {
if (result.Data) { if (result.Data) {
let imageURL = result.Data.ImageURL; //let imageURL = result.Data.ImageURL;
let imageURL;
if (that.selectChangeType == 5) {
imageURL = result.Data.Url;
} else {
imageURL = result.Data.ImageURL;
}
imageURL = imageURL.replace("http:", imageURL = imageURL.replace("http:",
"https:") "https:")
if (!item.isChangeAi) { if (!item.isChangeAi) {
...@@ -2374,7 +2398,7 @@ ...@@ -2374,7 +2398,7 @@
src: urlData, src: urlData,
success: (image) => { success: (image) => {
if (this.e_active == 23) { if (this.e_active == 23) {
// 清空历史记录 //清空历史记录
items = []; // 当前显示的图片列表 items = []; // 当前显示的图片列表
index = 0; // 所点击的图片的索引 index = 0; // 所点击的图片的索引
snapshot = []; // 操作历史记录清空 snapshot = []; // 操作历史记录清空
...@@ -2725,6 +2749,8 @@ ...@@ -2725,6 +2749,8 @@
} else if (e == 2) { //贴图 } else if (e == 2) { //贴图
this.category(2); this.category(2);
} else if (e == 3) { //文本 } else if (e == 3) { //文本
index = null index = null
this.addtext = true this.addtext = true
...@@ -2865,6 +2891,9 @@ ...@@ -2865,6 +2891,9 @@
bgtextcolor() { bgtextcolor() {
this.bg_text_color = !this.bg_text_color this.bg_text_color = !this.bg_text_color
console.log(this.data)
console.log(this.bg_text_color)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['textsettings'].open({ this.$refs['textsettings'].open({
data: this.data, data: this.data,
...@@ -2878,7 +2907,7 @@ ...@@ -2878,7 +2907,7 @@
// 获取当前选中的部件 // 获取当前选中的部件
var item = items[index]; var item = items[index];
if (item != undefined && item.type == 1) { if (item != undefined && item.type == 1) {
item.font_family = typeface.key item.font_family = typeface.title
item.font_dict_id = typeface.id item.font_dict_id = typeface.id
this.data.itemList = items this.data.itemList = items
await this.setData({ await this.setData({
......
...@@ -41,13 +41,14 @@ ...@@ -41,13 +41,14 @@
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;"> <view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;"> <view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
<image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image> <image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image>
<view class="start_text" style="margin-top: -80upx;font-size: 31upx;">{{machine_id || ''}}</view>
<view class="start_text">{{msg || ''}}</view> <view class="start_text">{{msg || ''}}</view>
<view @click="tomakePhoneCall"> <view @click="tomakePhoneCall" v-if="phone">
<view class="start_text">联系客服</view> <view class="start_text">联系客服</view>
<view class="start_text" style="display: flex; justify-content: center; align-items: center;"> <view class="start_text" style="display: flex; justify-content: center; align-items: center;">
<image src="../../static/phone.png" mode="" <image src="../../static/phone.png" mode=""
style="width: 32upx; height: 32upx; margin-right: 5upx;"></image> style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
{{phone || '18938664545'}} {{phone || ''}}
</view> </view>
</view> </view>
</view> </view>
...@@ -69,7 +70,7 @@ ...@@ -69,7 +70,7 @@
<image src="../../static/liebiao.png" mode="" style="width: 243upx; height: 123upx;"></image> <image src="../../static/liebiao.png" mode="" style="width: 243upx; height: 123upx;"></image>
</view> </view>
<view @click="toProxyApplet()" v-if="list.is_open_manage == 1" style="position: fixed; z-index: 99; right: 0; bottom: 300upx; display: flex;align-items: center;justify-content: center; <view @click="toProxyApplet()" v-if="list.is_open_manage == 1 && statusloading == 1 " style="position: fixed; z-index: 99; right: 0; bottom: 300upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #F29F3D; border-radius: 44upx 0px 0px 44upx;"> width: 100upx; height: 88upx; background: #F29F3D; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;"> <view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>运营</view> <view>运营</view>
...@@ -109,12 +110,16 @@ ...@@ -109,12 +110,16 @@
msg: null, msg: null,
worksid: 1, worksid: 1,
statusloading: null, //加载状态 statusloading: null, //加载状态
phone: '18938664545', phone: '',
goods: [], //商品列表 goods: [], //商品列表
currentIndex: 0, currentIndex: 0,
selectItem: null, //选择对象 selectItem: null, //选择对象
name: "", name: "",
show_admin_login: 0 show_admin_login: 0,
globalData: {
typefacedata: [],
num:0
},
}; };
}, },
...@@ -209,7 +214,7 @@ ...@@ -209,7 +214,7 @@
mask: true mask: true
}) })
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.phone || '18938664545', //仅为示例 phoneNumber: this.phone || '', //仅为示例
success(res) { success(res) {
uni.hideLoading(); uni.hideLoading();
}, },
...@@ -281,7 +286,17 @@ ...@@ -281,7 +286,17 @@
}else{ }else{
this.worksid = 100211 this.worksid = 100211
} }
console.log("worksid="+this.worksid)
if(this.list.wx_flag == 1){
this.msg = "稍等片刻,我很快恢复"
this.myheadtext = '歇一歇' //头部标题栏
this.statusloading = 2
this.phone = this.list.shop.tel
uni.stopPullDownRefresh();
uni.hideLoading();
return;
}
this.toFirstCheck(); this.toFirstCheck();
this.myheadtext = this.machine_id //头部标题栏 this.myheadtext = this.machine_id //头部标题栏
} }
...@@ -351,7 +366,64 @@ ...@@ -351,7 +366,64 @@
this.$base.machine_id = this.machine_id this.$base.machine_id = this.machine_id
this.statusloading = 1; this.statusloading = 1;
this.Adlist() this.Adlist()
//轮播图
let url = "/api/material/mchineFontFamilyList";
let queryParam = {
machine_id: this.machine_id
}
var that = this;
this.$http.post(url, queryParam).then(result => {
var dataList = result.data;
dataList.forEach(item => {
item.long = false
item.textlong = null
})
dataList.unshift({
id: 0,
key: "SourceHanSansCN-Normal",
remark: "",
title: "思源黑体",
textlong: true,
long: true
})
this.globalData.typefacedata = dataList
this.$base.typefacedata = this.globalData.typefacedata
let t1 = new Date().getTime();
let that = this
this.globalData.typefacedata.forEach(textlist => {
uni.loadFontFace({
global: true,
family: textlist.title,
source: 'url(' + textlist.remark + ')',
desc: {
weight: 100
},
success: function(success) {
textlist.textlong = true
},
fail: function(fail) {
textlist.textlong = false
},
complete(res) {
//console.log("完成")
textlist.long = true
that.globalData.typefacedata.forEach(item => {
if (item.long == true) {
that.globalData.num++
}
})
that.$base.typefacedata = that.globalData.typefacedata
if (that.globalData.num == that.globalData.typefacedata.length) {
}
that.globalData.num = 0
}
})
})
}).catch(err => {
//uni.hideLoading();
});
}, },
onShow() { onShow() {
......
<template> <template>
<view class="content" style="width: 100%; height: 100%; position: relative; margin-top: 100upx;"> <view class="content" style="width: 100%; height: 100%; position: relative;">
<refresh @interrupt="interrupt" @pushToInterrupt="pushToInterrupt" @finished="finished" @scrolltolower="g" :scrollHeight="windowHeight"> <refresh @interrupt="interrupt" @pushToInterrupt="pushToInterrupt" @finished="finished" @scrolltolower="g" :scrollHeight="windowHeight">
<template slot="top"> <template slot="top">
<view style="color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;" <view style="color: #FFFFFF;position: absolute; top: 0;width: 100%; text-align: center;"
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<view style="position: fixed;width: 100%;" :style="{bottom: inputBottom+'px'}"> <view style="position: fixed;width: 100%;" :style="{bottom: inputBottom+'px'}">
<view v-if="show && text != 'typeface'" style="width: 100%; height: 100upx; display: flex; flex-direction: row; "> <view v-if="show && text != 'typeface'" style="width: 100%; height: 100upx; display: flex; flex-direction: row; ">
<!-- <view>{{show}}{{text}}</view> -->
<view style="width: 260upx; height: 100%; background: #292933; border-top-right-radius: 60upx;display: flex; flex-direction: row; "> <view style="width: 260upx; height: 100%; background: #292933; border-top-right-radius: 60upx;display: flex; flex-direction: row; ">
<image v-if="bg_text_color" style="width: 47upx; height: 47upx; display: block;margin-top: 45upx; margin-left:45upx;" <image v-if="bg_text_color" style="width: 47upx; height: 47upx; display: block;margin-top: 45upx; margin-left:45upx;"
src="../../static/img/icon_qiehuan_on.png" src="../../static/img/icon_qiehuan_on.png"
...@@ -24,13 +26,14 @@ ...@@ -24,13 +26,14 @@
height: 98upx;"> height: 98upx;">
<view style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;"> <view style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;">
<input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73" :adjust-position="false" <input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73" :adjust-position="false"
type="text" maxlength="20" @input="textInput" v-model="data.currentText" @focus="focusTextarea" @blur="blurTextarea" type="text" maxlength="35" @input="textInput" v-model="data.currentText" @focus="focusTextarea" @blur="blurTextarea"
placeholder="请输入文字内容..." style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" /> placeholder="请输入文字内容..." style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" />
</view> </view>
<view style="width: 1px; height: 28upx; background: #FFFFFF;"></view> <view style="width: 1px; height: 28upx; background: #FFFFFF;"></view>
<image style="width: 43upx; height: 30upx; display: block;margin: auto;" src="../../static/icon/icon_determine.png" <image style="width: 43upx; height: 30upx; display: block;margin: auto;" src="../../static/icon/icon_determine.png"
mode="aspectFill" @click="cancel('share')"></image> mode="aspectFill" @click="cancel('share')"></image>
</view> </view>
<view v-if="text == 'typeface'" style="border-bottom: 2upx solid #000000;"> <view v-if="text == 'typeface'" style="border-bottom: 2upx solid #000000;">
<scroll-view style="width: calc(100% - 40upx); margin: auto; height:598upx; overflow: hidden;" scroll-y scroll-with-animation > <scroll-view style="width: calc(100% - 40upx); margin: auto; height:598upx; overflow: hidden;" scroll-y scroll-with-animation >
<view v-for="(item, index) in typefacedata" <view v-for="(item, index) in typefacedata"
...@@ -61,24 +64,7 @@ ...@@ -61,24 +64,7 @@
</scroll-view> </scroll-view>
</view> </view>
<view v-if="show && text != 'typeface'" style="display: flex; height: 90upx; padding: 38upx 0 41upx; align-items: center;"> <view v-if="show && text != 'typeface'" style="display: flex; height: 90upx; padding: 38upx 0 41upx; align-items: center;">
<!-- 背景 -->
<!-- <view style="width: calc(100% / 7);" @click="bgtextcolor">
<image style="width: 69upx; height: 69upx; display: block;margin: auto;" :src="bg_text_color ? '../../static/icon/icon_qiehuan_one.png' : '../../static/icon/icon_qiehuan.png'"
mode="aspectFill"></image>
</view> -->
<!-- 颜色 开始-->
<!-- <scroll-view style="box-sizing: border-box; white-space: nowrap; margin: 10upx 0; " scroll-x scroll-with-animation >
<view style="text-align: center; display: inline-block; padding-left: 20upx;" v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
<view v-if="data.itemList[data.cidx]">
<view v-if="data.itemList[data.cidx].font_color == item.color && !bg_text_color" style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #EF6262; border-radius: 50%;" :style="{background:item.color}"></view>
<view v-else-if="data.itemList[data.cidx].under_color == item.color && bg_text_color" style="width: 60upx; height: 60upx; background: #000000; border: 4upx solid #EF6262; border-radius: 50%;" :style="{background:item.color}" ></view>
<view v-else style="width: 68upx; height: 68upx; border-radius: 50%;" :style="{background:item.color}" ></view>
</view>
<view v-else style="width: 68upx; height: 68upx; border-radius: 50%;" :style="{background:item.color}"></view>
</view>
</scroll-view> -->
<!-- 颜色 结束-->
<!-- 颜色 开始-->
<scroll-view style="box-sizing: border-box; white-space: nowrap; <scroll-view style="box-sizing: border-box; white-space: nowrap;
margin-left: 35upx; margin-right: 35upx;margin-bottom: 30upx; margin-top: 40upx; width: calc(100% - 70upx);" scroll-x margin-left: 35upx; margin-right: 35upx;margin-bottom: 30upx; margin-top: 40upx; width: calc(100% - 70upx);" scroll-x
scroll-with-animation> scroll-with-animation>
...@@ -721,7 +707,6 @@ ...@@ -721,7 +707,6 @@
index: 'WG9' index: 'WG9'
} }
], ],
show:true, show:true,
data: null, data: null,
bg_text_color: null, bg_text_color: null,
...@@ -735,7 +720,8 @@ ...@@ -735,7 +720,8 @@
{text:'站酷庆科黄油体',url:'url("https://tprint.refinecolor.com/text/ZhankuQingkeButterBody.ttf")',fontname:'站酷庆科黄油体',lineheight:1.18,long:false,textlong:null}, {text:'站酷庆科黄油体',url:'url("https://tprint.refinecolor.com/text/ZhankuQingkeButterBody.ttf")',fontname:'站酷庆科黄油体',lineheight:1.18,long:false,textlong:null},
{text:'字体视界法棍体',url:'url("https://tprint.refinecolor.com/text/Font_horizon_method_stick_body.ttf")',fontname:'字体视界法棍体',lineheight:1.14,long:false,textlong:null}, {text:'字体视界法棍体',url:'url("https://tprint.refinecolor.com/text/Font_horizon_method_stick_body.ttf")',fontname:'字体视界法棍体',lineheight:1.14,long:false,textlong:null},
], ],
typefacedata:null typefacedata:null,
countNum:0
}; };
}, },
onShow() { onShow() {
...@@ -761,10 +747,20 @@ ...@@ -761,10 +747,20 @@
return textStr; return textStr;
}, },
//过滤字符串
/* filterTextInput(textStr) {
let content = textStr.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\.\,\?\<\>\。\,\-\——\=\;\@\!\!\+\$\%\*\(\)\#\&\*]/g, '');
let that = this;
setTimeout(function() {
that.data.currentText = content;
that.$emit('textInput', content)
}, 0);
}, */
//过滤字符串 //过滤字符串
filterTextInput(textStr) { filterTextInput(textStr) {
let content = textStr.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\.\,\?\<\>\。\,\-\—\=\;\@\!\!\+\$\%\*\(\)\#\&\*]/g, ''); textStr = textStr.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g, "");
let content = textStr
let that = this; let that = this;
setTimeout(function() { setTimeout(function() {
that.data.currentText = content; that.data.currentText = content;
...@@ -772,18 +768,23 @@ ...@@ -772,18 +768,23 @@
}, 0); }, 0);
}, },
typefaceshow(e){ typefaceshow(e){
this.$emit('typefaceshow', e) this.$emit('typefaceshow', e)
}, },
keyboard(e) { keyboard(e) {
this.inputBottom = 0 this.inputBottom = 0
}, },
typeface(e) { typeface(e) {
this.text = e this.text = e
this.inputBottom = 0 this.inputBottom = 0
let that = this;
//console.log("text="+this.text+"&show="+this.show+"&this.countNum="+this.countNum)
}, },
typefaceClick(e,index) { typefaceClick(e,index) {
// console.log(index + 1)
if((index + 1) == this.typefacedata.length){ if((index + 1) == this.typefacedata.length){
if(e.textlong == true){ if(e.textlong == true){
this.$emit('typefaceClick', e) this.$emit('typefaceClick', e)
...@@ -798,6 +799,7 @@ ...@@ -798,6 +799,7 @@
this.$emit('typefaceClick', e) this.$emit('typefaceClick', e)
} }
}, },
loadFont(textlist) { loadFont(textlist) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
...@@ -825,6 +827,7 @@ ...@@ -825,6 +827,7 @@
} }
}) })
}, },
setData(obj) { setData(obj) {
let that = this; let that = this;
let keys = []; let keys = [];
...@@ -861,7 +864,6 @@ ...@@ -861,7 +864,6 @@
}, },
textInput(e) { textInput(e) {
this.filterTextInput(e.detail.value) this.filterTextInput(e.detail.value)
//this.$emit('textInput', e)
}, },
cancel(e) { cancel(e) {
this.$emit('cancel', e) this.$emit('cancel', e)
...@@ -879,6 +881,7 @@ ...@@ -879,6 +881,7 @@
this.data = data.data this.data = data.data
this.bg_text_color = data.bg_text_color this.bg_text_color = data.bg_text_color
this.text = data.text this.text = data.text
console.log("text="+this.text)
if(this.text == 'typeface'){ if(this.text == 'typeface'){
this.typeface('typeface') this.typeface('typeface')
this.inputBottom = 'none' this.inputBottom = 'none'
......
...@@ -61,19 +61,6 @@ ...@@ -61,19 +61,6 @@
</view> </view>
</view> </view>
<!-- <view v-if="designer.status.value == 1">
<view style="text-align: left; font-size: 29upx; color: #F29F3D ; line-height: 80upx;font-weight: 600;">
打印中
</view>
</view>
<view v-else>
<view style="text-align: left; font-size: 30upx; color: #333; line-height: 80upx;font-weight: 600; margin-top: 20upx;">
排队中
</view>
</view>
<view style="width: 90%;font-size: 28upx; margin-top: 70upx; font-weight: 550; text-align: right; font-size: 36upx; color: #333; margin-right: 30upx;">
{{designer.id || ''}}
</view> -->
<!-- 提示 --> <!-- 提示 -->
<view v-if="sighstate && designer != null"> <view v-if="sighstate && designer != null">
<view <view
...@@ -88,8 +75,6 @@ ...@@ -88,8 +75,6 @@
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image> style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
</view> </view>
<view style="width: 558upx;position: absolute; top: 40upx "> <view style="width: 558upx;position: absolute; top: 40upx ">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 500upx; width: 500upx;
height: 350upx; height: 350upx;
...@@ -105,15 +90,6 @@ ...@@ -105,15 +90,6 @@
</view> </view>
</view> </view>
<!-- <view style="width: 400upx; height: 300upx; display: flex; border: 1px solid #F6BE36;
box-shadow: 0 0 20px #ccc; border-radius: 10upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 200upx; margin: auto;">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_120'" mode="aspectFit" style=" margin: auto; width: 120upx; max-height: 200upx; "></image>
</view>
</view> -->
<!-- 作品排队中 -->
<view v-if="designer.status.value == 1" style="text-align: center; font-size: 36upx; margin-top: 50upx;">作品打印中</view> <view v-if="designer.status.value == 1" style="text-align: center; font-size: 36upx; margin-top: 50upx;">作品打印中</view>
<view v-if="designer.status.value != 1" style="text-align: center; font-size: 36upx; margin-top: 50upx;">作品排队中</view> <view v-if="designer.status.value != 1" style="text-align: center; font-size: 36upx; margin-top: 50upx;">作品排队中</view>
...@@ -164,7 +140,7 @@ ...@@ -164,7 +140,7 @@
key: 2, //1直营配送站 2 万能通用版 3色彩自助站 key: 2, //1直营配送站 2 万能通用版 3色彩自助站
sighstate: false, sighstate: false,
statetime: null, statetime: null,
animMaind_time: 10000, //动画时间----刷子上下动画时间 animMaind_time: 5000, //动画时间----刷子上下动画时间
designer: null, designer: null,
userId: null, //用户信息 userId: null, //用户信息
headheight: 0, //头部高度 headheight: 0, //头部高度
......
...@@ -3,13 +3,13 @@ if(!accountInfo.miniProgram.envVersion){ ...@@ -3,13 +3,13 @@ if(!accountInfo.miniProgram.envVersion){
//console.error("获取运行环境失败!"); //console.error("获取运行环境失败!");
} }
const baseApi = { const baseApi = {
// 开发版 //开发版
develop: "https://tprint.refinecolor.com", develop: "https://tprint.refinecolor.com",
//develop: "https://tprint.colorpark.cn", //develop: "https://tprint.colorpark.cn",
// 体验版 //体验版
trial: "https://tprint.refinecolor.com", //trial: "https://tprint.refinecolor.com",
// trial: "https://tprint.colorpark.cn", trial: "https://tprint.colorpark.cn",
// 正式版 //正式版
release: "https://tprint.colorpark.cn", release: "https://tprint.colorpark.cn",
}; };
const baseURL = baseApi[accountInfo.miniProgram.envVersion] const baseURL = baseApi[accountInfo.miniProgram.envVersion]
......
...@@ -37,6 +37,14 @@ function callRecognizeBankCard(imageURL, miniProgramType, type, callback) { ...@@ -37,6 +37,14 @@ function callRecognizeBankCard(imageURL, miniProgramType, type, callback) {
request_["ImageURL"] = imageURL; request_["ImageURL"] = imageURL;
request_["Mode"] = "ln17_256"; request_["Mode"] = "ln17_256";
request_["OutputFormat"] = "png"; request_["OutputFormat"] = "png";
}else if (type == 5) { //图像超分
request_["Url"] = imageURL;
Action = "MakeSuperResolutionImage";
endpoint = "imageenhan.cn-shanghai.aliyuncs.com";
API_VERSION = "2019-09-30";
request_["Mode"] = "enhancement";
request_["UpscaleFactor"] = "4";
request_["OutputQuality"] = "100";
} else { } else {
request_["AlgoType"] = "handdrawn"; request_["AlgoType"] = "handdrawn";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment