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() {
//调用监听网络状态的方法 //调用监听网络状态的方法
......
...@@ -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;"
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
<view> <view>
<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() {
...@@ -755,16 +741,26 @@ ...@@ -755,16 +741,26 @@
//替换文字 //替换文字
replaceText(textStr){ replaceText(textStr){
if(textStr.includes("-Regular")){ if(textStr.includes("-Regular")){
textStr = textStr.replace("-Regular","") textStr = textStr.replace("-Regular","")
} }
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