Commit 45894241 by huahua

提交

parent 7d923898
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
//设置语言 //设置语言
saveLanguage(defaultStr) { saveLanguage(defaultStr) {
this._i18n.locale = 'en-us';
uni.setStorageSync('lang', this._i18n.locale);
switch (defaultStr) { switch (defaultStr) {
case "ch": case "ch":
case "zh-cn": case "zh-cn":
...@@ -59,6 +63,11 @@ ...@@ -59,6 +63,11 @@
this._i18n.locale = 'es-es'; this._i18n.locale = 'es-es';
uni.setStorageSync('lang', this._i18n.locale); uni.setStorageSync('lang', this._i18n.locale);
break; break;
// default:
// this._i18n.locale = 'en-us';
// uni.setStorageSync('lang', this._i18n.locale);
// console.log("进来22")
// break;
} }
}, },
}, },
...@@ -76,6 +85,7 @@ ...@@ -76,6 +85,7 @@
let lang = uni.getStorageSync('lang'); let lang = uni.getStorageSync('lang');
if (lang && lang != "" && lang != null) { if (lang && lang != "" && lang != null) {
this._i18n.locale = lang; this._i18n.locale = lang;
this.saveLanguage(this._i18n.locale);
} }
if (options.query.machine_id && options.query.machine_id != "null") { //判断传的有没有设备id if (options.query.machine_id && options.query.machine_id != "null") { //判断传的有没有设备id
this.globalData.machine_id = options.query.machine_id this.globalData.machine_id = options.query.machine_id
...@@ -87,6 +97,7 @@ ...@@ -87,6 +97,7 @@
}; };
if (lang && lang != "" && lang != null) { if (lang && lang != "" && lang != null) {
this._i18n.locale = lang; this._i18n.locale = lang;
this.saveLanguage(this._i18n.locale);
} else { } else {
this.saveLanguage('en-us'); this.saveLanguage('en-us');
logoservice.verifyToken({ logoservice.verifyToken({
......
...@@ -16,8 +16,7 @@ export default { ...@@ -16,8 +16,7 @@ export default {
default: 0 default: 0
}, },
// 进度条样式 // 进度条样式
/* /*aqua
aqua
copper copper
candy candy
neon neon
......
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
<view v-show="show" class="t-wrapper" @touchmove.stop.prevent="moveHandle"> <view v-show="show" class="t-wrapper" @touchmove.stop.prevent="moveHandle">
<view class="t-mask" :class="{active:active}" @click.stop="close"></view> <view class="t-mask" :class="{active:active}" @click.stop="close"></view>
<view class="t-box" :class="{active:active}"> <view class="t-box" :class="{active:active}">
<!-- <view class="t-header">
<view class="t-header-button" @click="close">取消</view>
<view class="t-header-button" @click="confirm">确认</view>
</view> -->
<!-- 颜色 -->
<scroll-view style="box-sizing: border-box; white-space: nowrap; margin: 10upx 0;" scroll-x scroll-with-animation > <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;" class="t-alternative__item" v-for="(item,index) in colorList" :key="index"> <view style="text-align: center; display: inline-block;" class="t-alternative__item" v-for="(item,index) in colorList" :key="index">
<view class="t-alternative__item-content" :style="{ background: 'rgba(' + item.r + ',' + item.g + ',' + item.b + ',' + item.a + ')' }" <view class="t-alternative__item-content" :style="{ background: 'rgba(' + item.r + ',' + item.g + ',' + item.b + ',' + item.a + ')' }"
...@@ -28,18 +24,7 @@ ...@@ -28,18 +24,7 @@
<view class="t-pointer" :style="{ top: site[0].top - 8 + 'px', left: site[0].left - 8 + 'px' }"></view> --> <view class="t-pointer" :style="{ top: site[0].top - 8 + 'px', left: site[0].left - 8 + 'px' }"></view> -->
</view> </view>
</view> </view>
<!-- <view class="t-control__box">
<view class="t-control__color">
<view class="t-control__color-content" :style="{ background: 'rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',' + rgba.a + ')' }"></view>
</view>
<view class="t-control-box__item">
<view class="t-controller boxs" @touchstart="touchstart($event, 1)" @touchmove="touchmove($event, 1)" @touchend="touchend($event, 1)">
<view class="t-hue">
<view class="t-circle" :style="{ left: site[1].left - 12 + 'px' }"></view>
</view>
</view>
</view>
</view> -->
<view class="t-control__box"> <view class="t-control__box">
<view class="t-control__color"> <view class="t-control__color">
<!-- <view class="t-control__color-content" <!-- <view class="t-control__color-content"
...@@ -66,48 +51,7 @@ ...@@ -66,48 +51,7 @@
:style="{ background: 'rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',0.2)' }"></view> :style="{ background: 'rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',0.2)' }"></view>
</view> </view>
</view> </view>
<!-- <view class="t-result__box">
<view v-if="mode" class="t-result__item">
<view class="t-result__box-input">{{hex}}</view>
<view class="t-result__box-text">HEX</view>
</view>
<template v-else>
<view class="t-result__item">
<view class="t-result__box-input">{{rgba.r}}</view>
<view class="t-result__box-text">R</view>
</view>
<view class="t-result__item">
<view class="t-result__box-input">{{rgba.g}}</view>
<view class="t-result__box-text">G</view>
</view>
<view class="t-result__item">
<view class="t-result__box-input">{{rgba.b}}</view>
<view class="t-result__box-text">B</view>
</view>
<view class="t-result__item">
<view class="t-result__box-input">{{rgba.a}}</view>
<view class="t-result__box-text">A</view>
</view>
</template>
<view class="t-result__item t-select" @click="select">
<view class="t-result__box-input">
<view>切换</view>
<view>模式</view>
</view>
</view>
</view> -->
<!-- <view class="t-alternative">
<view class="t-alternative__item" v-for="(item,index) in colorList" :key="index">
<view class="t-alternative__item-content" :style="{ background: 'rgba(' + item.r + ',' + item.g + ',' + item.b + ',' + item.a + ')' }"
@click="selectColor(item)">
</view>
</view>
<view class="t-alternative__item" >
<view class="t-alternative__item-content" style="background: rgba(0,0,0,0)"
@click="eliminate(item)">
</view>
</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
<button open-type="share" class="tool-btn"> <button open-type="share" class="tool-btn">
<image class="icon" :src="item.select?item.selectIcon:item.icon" mode="aspectFit"></image> <image class="icon" :src="item.select?item.selectIcon:item.icon" mode="aspectFit"></image>
<text class="title" :class="{'title-select': item.select}"> <text class="title" :class="{'title-select': item.select}">
{{$i18n.messages[$i18n.locale][item.title]}} {{$i18n.messages[$i18n.locale][item.title]}}
<!-- {{this.$i18n.messages[this.$i18n.locale]['画笔大小']}} -->
<!-- <view> {{this.$i18n.messages[this.$i18n.locale]['画笔大小']}}</view> -->
</text> </text>
</button> </button>
</block> </block>
...@@ -17,12 +15,10 @@ ...@@ -17,12 +15,10 @@
<image class="icon" :src="item.select?item.selectIcon:item.icon" mode="aspectFit"></image> <image class="icon" :src="item.select?item.selectIcon:item.icon" mode="aspectFit"></image>
<text class="title" :class="{'title-select': item.select}"> <text class="title" :class="{'title-select': item.select}">
{{$i18n.messages[$i18n.locale][item.title]}} {{$i18n.messages[$i18n.locale][item.title]}}
<!-- <view> {{this.$i18n.messages[this.$i18n.locale]['画笔大小']}}</view> -->
<!-- {{this.$i18n.messages[this.$i18n.locale]['画笔大小']}} -->
</text> </text>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view> <view>
<!-- 颜色 --> <!-- 颜色 -->
...@@ -39,17 +35,11 @@ ...@@ -39,17 +35,11 @@
</view> </view>
<view class="pen-section"> <view class="pen-section">
<view style="display: flex; align-items: center; justify-content: center;"> <view style="display: flex; align-items: center; justify-content: center;">
<!-- <view class="pen" :style="{backgroundColor: penColor, height: lineWidth}"></view>
<view class="triangle-right"
:style="{'border-top': (lineValue / 2) + 'px solid transparent',
'border-left': lineValue + 'px solid' + penColor,
'border-bottom': (lineValue / 2) + 'px solid transparent',}"></view> -->
<view style="font-size: 20upx; margin-right: 16upx; color: #FFFFFF; width: 240upx;"> <view style="font-size: 20upx; margin-right: 16upx; color: #FFFFFF; width: 240upx;">
{{$i18n.messages[$i18n.locale]['画笔大小']}} {{$i18n.messages[$i18n.locale]['画笔大小']}}
</view> </view>
</view> </view>
<slider min="1" max="20" :value="lineValue" block-size="20" activeColor="#FFFFFF" class="pen-slider" @change="penWidthChange"/> <slider min="1" max="20" :value="lineValue" block-size="20" activeColor="#FFFFFF" class="pen-slider" @change="penWidthChange"/>
<!-- <view class="pen-txt">{{lineWidth}}</view> -->
</view> </view>
</view> </view>
</template> </template>
...@@ -602,7 +592,7 @@ ...@@ -602,7 +592,7 @@
} }
}, },
methods: { methods: {
// 常用颜色选择 //常用颜色选择
selectColor(color,index) { selectColor(color,index) {
this.selectColorIndex = index this.selectColorIndex = index
this.$emit('colorPickTap', color); this.$emit('colorPickTap', color);
...@@ -611,7 +601,6 @@ ...@@ -611,7 +601,6 @@
this.$emit('toolItemTap', index); this.$emit('toolItemTap', index);
}, },
penWidthChange (e) { penWidthChange (e) {
console.log('滑块滚动:' + JSON.stringify(e));
this.lineWidth = e.detail.value + 'px'; this.lineWidth = e.detail.value + 'px';
this.lineValue = e.detail.value; this.lineValue = e.detail.value;
this.$emit('penWidthChange', this.lineValue); this.$emit('penWidthChange', this.lineValue);
...@@ -647,9 +636,10 @@ ...@@ -647,9 +636,10 @@
} }
.title { .title {
font-size: 20upx; font-size: 19upx;
margin-left: 8upx; margin-left: 8upx;
color: #FFFFFF; color: #FFFFFF;
line-height: 30upx;
} }
.title-select { .title-select {
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
border-radius: 100px; border-radius: 100px;
background-color: #f1f1f1 background-color: #f1f1f1
} }
.uni-badge.uni-badge-inverted { .uni-badge.uni-badge-inverted {
padding: 0 5px 0 0; padding: 0 5px 0 0;
color: #999; color: #999;
......
...@@ -28,13 +28,8 @@ ...@@ -28,13 +28,8 @@
<view style="width: 100%;"> <view style="width: 100%;">
<image :src="item.icon + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit" <image :src="item.icon + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"
style="width: 60%; height: 80upx; margin: auto; display: block;"></image> style="width: 60%; height: 80upx; margin: auto; display: block;"></image>
<!-- <view style="text-align: center; font-size: 28upx; margin-top: 10upx; width: 95%; margin: auto;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;word-break:break-all;">
{{item.title || ''}}
</view> -->
</view> </view>
</view> </view>
<!-- </view> -->
</scroll-view> </scroll-view>
<!-- 无数据 --> <!-- 无数据 -->
<view v-if="catrgoryList.length == 0" style="text-align: center; color: #BEBEBE;"> <view v-if="catrgoryList.length == 0" style="text-align: center; color: #BEBEBE;">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
style="height: 23upx; width: 23upx; padding: 21upx 33upx;"></image> style="height: 23upx; width: 23upx; padding: 21upx 33upx;"></image>
</view> </view>
<scroll-view v-if="languageList.length > 0" scroll-y scroll-with-animation style="box-sizing: border-box;white-space: nowrap; <scroll-view v-if="languageList.length > 0" scroll-y scroll-with-animation style="box-sizing: border-box;white-space: nowrap;
width:100% ; margin:0 auto; height: 800upx; overflow: hidden;"> width:100% ; margin:40upx auto; height: 740upx; overflow: hidden; ">
<view v-for="(item,index) in languageList" :key="index" @click="languageClick(item)" <view v-for="(item,index) in languageList" :key="index" @click="languageClick(item)"
style=" margin: 10upx; display: flex;align-items: center; height: 110upx; width: calc(100% - 20upx); text-align: center;justify-content: center; font-size: 30upx;"> style=" margin: 10upx; display: flex;align-items: center; height: 110upx; width: calc(100% - 20upx); text-align: center;justify-content: center; font-size: 30upx;">
{{item.title}} {{item.title}}
......
...@@ -5,17 +5,8 @@ ...@@ -5,17 +5,8 @@
width: 220upx; width: 220upx;
height: 110upx;"> height: 110upx;">
</image> </image>
<!-- <image v-if="statusloading == 1 && support_paypal" src="../../static/img/icon_home_order_image.png" style="
position: fixed;
z-index: 997;
right: -10upx;
bottom: 650upx;
width: 110upx;
height:110upx;" @click="toOrderList()"></image> -->
<view v-if="statusloading == 1" style=" <view v-if="statusloading == 1" style="
position: fixed; position: fixed;
z-index: 99; z-index: 99;
right: 0upx; right: 0upx;
...@@ -26,19 +17,8 @@ ...@@ -26,19 +17,8 @@
font-size: 20upx; text-align: center; font-size: 20upx; text-align: center;
line-height:80upx; border: 8upx solid #F29F3D; background: #FFFFFF; border-radius: 30upx 0upx 30upx 0upx; font-size: 30upx; font-weight: 600; line-height:80upx; border: 8upx solid #F29F3D; background: #FFFFFF; border-radius: 30upx 0upx 30upx 0upx; font-size: 30upx; font-weight: 600;
"@click="toSelectLanguage()">EN "@click="toSelectLanguage()">EN
</view> </view>
<!-- <image v-if="statusloading == 1" src="../../static/img/icon_change_language.png" style="
position: fixed;
z-index: 997;
right: 0upx;
bottom: 820upx;
width:90upx;
height:80upx;
font-size: 20upx; text-align: center;
line-height:80upx; " @click="toSelectLanguage()">
</image> -->
<!-- 自定义头部 --> <!-- 自定义头部 -->
<myhead :worksid="9" :title=" $i18n.messages[$i18n.locale]['定制蛋糕'] + myheadtext" :color="'#fff'" <myhead :worksid="9" :title=" $i18n.messages[$i18n.locale]['定制蛋糕'] + myheadtext" :color="'#fff'"
...@@ -71,12 +51,12 @@ ...@@ -71,12 +51,12 @@
</view> </view>
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 130upx; left: 0; right: 0; margin: auto; <view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 130upx; left: 0; right: 0; margin: auto;
width: 300upx; height: 100upx; width: 380upx; height: 110upx;
background: linear-gradient(92deg, #E6B01A, #F29F3D); background: linear-gradient(92deg, #E6B01A, #F29F3D);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35); box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;"> border-radius: 50px;">
<view <view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;"> style=" text-align: center; line-height: 110upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
{{$i18n.messages[$i18n.locale]['立即定制']}} {{$i18n.messages[$i18n.locale]['立即定制']}}
</view> </view>
</view> </view>
...@@ -109,6 +89,7 @@ ...@@ -109,6 +89,7 @@
<!-- 选择语言 --> <!-- 选择语言 -->
<switchLanguage ref="switchLanguage" @backLanguage="backLanguage"></switchLanguage> <switchLanguage ref="switchLanguage" @backLanguage="backLanguage"></switchLanguage>
</view> </view>
</template> </template>
......
...@@ -325,18 +325,20 @@ ...@@ -325,18 +325,20 @@
<!-- 切换手机 --> <!-- 切换手机 -->
<view v-if="!active && !guide_left" @click="changeGoodSize()" <view v-if="!active && !guide_left" @click="changeGoodSize()"
style="z-index: 99;position: fixed; left: 0upx; top: 150upx;"> style="z-index: 99;position: fixed; left: 0upx; top: 150upx;">
<view style="width: 115upx; height: 130upx; <view style="width: 180upx; height: 140upx;
line-height:130upx; line-height:140upx;
border: 8upx solid #F29F3D; border: 8upx solid #F29F3D;
border-radius: 0upx 20upx 60upx 0upx; border-radius: 0upx 20upx 60upx 0upx;
background: #F5DFA4; background: #F5DFA4;
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 28upx; font-size: 27upx;
justify-content: center; justify-content: center;
align-items: center;"> align-items: center; text-align: center;
<view style="margin-top: 15upx;"> {{$i18n.messages[$i18n.locale]['切换']}}</view> flex-direction: column;
<view> {{$i18n.messages[$i18n.locale]['形状']}}</view> display: flex; ">
<view style=" width: calc(100% - 20upx); margin: 0 auto;word-break:break-all; line-height: 30upx; text-align: center">
{{$i18n.messages[$i18n.locale]['切换']}}</view>
</view> </view>
</view> </view>
...@@ -3672,30 +3674,28 @@ ...@@ -3672,30 +3674,28 @@
} }
} }
// 底部工具栏 //底部工具栏
.toolRight { .toolRight {
position: fixed; position: fixed;
top: 200upx; top: 180upx;
right: 0; right: 0;
width: 120upx; width:150upx;
z-index: 999; z-index: 999;
.tool_li { .tool_li {
width: 100%; width: 100%;
height: 115upx; height: 130upx;
.tool_li_img { .tool_li_img {
width: 46upx; width: 46upx;
height: 40upx; height: 40upx;
display: block; display: block;
margin: auto; margin: auto;
} }
.tool_li_text { .tool_li_text {
text-align: center; text-align: center;
color: #000; color: #000;
font-size: 19upx; font-size: 19upx;
margin-top: 10upx; margin-top: 5upx;
line-height: 32upx;
} }
} }
} }
...@@ -3730,7 +3730,7 @@ ...@@ -3730,7 +3730,7 @@
} }
.tool_add { .tool_add {
width: 228upx; width: 280upx;
background: #F29F3D; background: #F29F3D;
line-height: 100upx; line-height: 100upx;
text-align: center; text-align: center;
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
</view> </view>
<!-- <view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view> --> <!-- <view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view> -->
</view> </view>
</view> </view>
</template> </template>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
}; };
}, },
mounted() { mounted() {
// this.getShapeList() //this.getShapeList()
}, },
/** /**
* 组件的公有方法列表 * 组件的公有方法列表
......
<template> <template>
<view v-if="isShow" style=" width: 100%; height: 100%; z-index: 9997;"> <view v-if="isShow" style=" width: 100%; z-index: 9997;">
<view <view
style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index:997; opacity: 0.5; " style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index:997; opacity: 0.5; "
@click="closeView()"> @click="closeView()">
</view> </view>
<view style=" width: 680upx; border-radius: 20upx; height: 800upx; z-index: 998; position: absolute ;margin:auto; top:0; right: 0; left: 0; bottom: 0;flex-direction: column"> <view style=" width: 700upx; border-radius: 20upx; height: 800upx; z-index: 998; position: absolute ;margin:auto; top:0; right: 0; left: 0; bottom: 0;flex-direction: column">
<image src="../../static/icon_home_good_back.png" style="width: 680upx; border-radius: 20upx; <image src="../../static/icon_home_good_back.png" style="width: 700upx; border-radius: 20upx;
height: 780upx; height: 780upx;
left:50%; left:50%;
top:50%; top:50%;
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
position: absolute; " /> position: absolute; " />
<view style="position: absolute; <view style="position: absolute;
width: 680upx; height:780upx; width: 700upx; height:780upx;
top: 0;"> top: 0;">
<view style=" <view style="
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
float: left; float: left;
border-radius: 15upx; border-radius: 15upx;
position: relative; position: relative;
width: 235upx"> width: 240upx">
<image mode="widthFix" <image mode="widthFix"
:class="[goodCurrentIndexTop == index? 'good-item-select':'good-item-no-select' ]" :class="[goodCurrentIndexTop == index? 'good-item-select':'good-item-no-select' ]"
:src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_200'"></image> :src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_200'"></image>
<view style="text-align: center; font-size: 27upx; width: 200upx; <view style="text-align: center; font-size: 26upx; width: 240upx;
color:#000; margin-top: 30upx; "> color:#000; margin-top: 30upx;line-height:30upx; ">
{{item !=null ? $i18n.messages[$i18n.locale][item.name] : ''}} {{item !=null ? $i18n.messages[$i18n.locale][item.name] : ''}}
</view> </view>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<view style=" <view style="
border-radius: 15upx; border-radius: 15upx;
position: relative; position: relative;
margin: 10upx;"> margin: 5upx;">
<view :class="[sizeCurrentIndexTop == index? 'size-item-select':'size-item-no-select' ]"> <view :class="[sizeCurrentIndexTop == index? 'size-item-select':'size-item-no-select' ]">
{{item !=null ? $i18n.messages[$i18n.locale][item.title] : ''}} {{item !=null ? $i18n.messages[$i18n.locale][item.title] : ''}}
</view> </view>
...@@ -237,23 +237,23 @@ ...@@ -237,23 +237,23 @@
.size-item-select { .size-item-select {
border: 2upx #F29F3D solid; border: 2upx #F29F3D solid;
width: 130upx; width: 155upx;
height: 65upx; height: 65upx;
background: #F5F5F5; background: #F5F5F5;
border-radius: 15upx; border-radius: 15upx;
line-height: 65upx; line-height: 65upx;
color: #000; color: #000;
font-size: 30upx; font-size: 27upx;
text-align: center; text-align: center;
} }
.size-item-no-select { .size-item-no-select {
width: 130upx; width: 155upx;
height: 65upx; height: 65upx;
background: #F5F5F5; background: #F5F5F5;
border-radius: 15upx; border-radius: 15upx;
line-height: 65upx; line-height: 65upx;
font-size: 30upx; font-size: 27upx;
color: #000; color: #000;
text-align: center; text-align: center;
border: 2upx transparent solid; border: 2upx transparent solid;
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
style="border-radius: 30upx; position: relative; overflow: hidden;"> style="border-radius: 30upx; position: relative; overflow: hidden;">
<view class="board-container"> <view class="board-container">
<!-- 遮罩 --> <!-- 遮罩 -->
<!-- <view style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 1; opacity: 0.8;" @click.stop.prevent="cancelBrand('share')"></view> -->
<view class="board" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',top: -differHeight +'px'}" <view class="board" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',top: -differHeight +'px'}"
:class="{'board-out':colorPanelShow}"> :class="{'board-out':colorPanelShow}">
<canvas class="board-canvas" canvas-id="drawCanvas" disable-scroll="true" <canvas class="board-canvas" canvas-id="drawCanvas" disable-scroll="true"
...@@ -97,12 +96,9 @@ ...@@ -97,12 +96,9 @@
hollowCircleMode: false, hollowCircleMode: false,
lastHollowRect: {}, lastHollowRect: {},
lastHollowCircle: {}, lastHollowCircle: {},
MobilePhoneHeight: 0, MobilePhoneHeight: 0,
MobilePhoneWidth: 0, MobilePhoneWidth: 0,
differHeight: 0, //相差高度 differHeight: 0, //相差高度
pixelRate: 1, pixelRate: 1,
data: {}, data: {},
openState: false, openState: false,
...@@ -113,10 +109,8 @@ ...@@ -113,10 +109,8 @@
}, },
methods: { methods: {
//获取图片信息 //获取图片信息
/* getImgInfo() { /*getImgInfo() {
let self = this; let self = this;
let img = new Image() let img = new Image()
img.src = self.data img.src = self.data
...@@ -124,12 +118,7 @@ ...@@ -124,12 +118,7 @@
//console.log('图片原始高度', img.height) //console.log('图片原始高度', img.height)
//console.log('图片原始宽度',img.width) //console.log('图片原始宽度',img.width)
}; */ }; */
uploadDIY(tempFilePaths) { uploadDIY(tempFilePaths) {
// uni.showLoading({
// title:this.$i18n.messages[this.$i18n.locale]['生成中'],
// mask: true
// })
var _this = this var _this = this
wx.request({ wx.request({
url: Env.getDevBaseURL() + '/api/AliossSign/getSign', url: Env.getDevBaseURL() + '/api/AliossSign/getSign',
...@@ -139,7 +128,7 @@ ...@@ -139,7 +128,7 @@
'content-type': 'application/x-www-form-urlencoded', 'content-type': 'application/x-www-form-urlencoded',
'Accept': 'application/json' 'Accept': 'application/json'
}, },
success: function(res) { success: function(res) {
var atter = res.data var atter = res.data
let time = new Date().getTime() + Math.floor((Math.random() * 1000) + 1) let time = new Date().getTime() + Math.floor((Math.random() * 1000) + 1)
wx.uploadFile({ wx.uploadFile({
...@@ -155,12 +144,7 @@ ...@@ -155,12 +144,7 @@
'callback': atter.callback, 'callback': atter.callback,
}, },
success: function(res) { success: function(res) {
if (res.statusCode != 200) { if (res.statusCode != 200) {
// console.log({
// errCode: '599',
// msg: '其他错误'
// })
return; return;
} }
if (res.statusCode == 200) { if (res.statusCode == 200) {
...@@ -169,7 +153,7 @@ ...@@ -169,7 +153,7 @@
icon: 'none', icon: 'none',
duration: 3000 duration: 3000
}) })
// // console.log(atter.host + '/' + atter.dir + time + '.png') //console.log(atter.host + '/' + atter.dir + time + '.png')
let url = atter.host + '/' + atter.dir + time + '.png' let url = atter.host + '/' + atter.dir + time + '.png'
_this.$emit('tuyaimg', url) _this.$emit('tuyaimg', url)
_this.$refs['brandscenter'].close() _this.$refs['brandscenter'].close()
...@@ -177,11 +161,11 @@ ...@@ -177,11 +161,11 @@
} }
}, },
fail: function(err) { fail: function(err) {
// wx.showToast({ //wx.showToast({
// title: '生成涂鸦成功失败!', // title: '生成涂鸦成功失败!',
// icon: 'none', // icon: 'none',
// duration: 1200 // duration: 1200
// }) //})
}, },
complete: function(err) { complete: function(err) {
// console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!'); // console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
...@@ -190,7 +174,9 @@ ...@@ -190,7 +174,9 @@
} }
}) })
}, },
change() {}, change() {
},
cancelBrand() { cancelBrand() {
this.clearDrawBoard() this.clearDrawBoard()
this.$refs['brandscenter'].close() this.$refs['brandscenter'].close()
...@@ -209,7 +195,6 @@ ...@@ -209,7 +195,6 @@
that.MobilePhoneHeight = res.windowHeight // 屏幕高度 that.MobilePhoneHeight = res.windowHeight // 屏幕高度
that.MobilePhoneWidth = res.windowWidth // 屏幕高度 that.MobilePhoneWidth = res.windowWidth // 屏幕高度
that.differHeight = res.windowHeight - that.data.bgHeight that.differHeight = res.windowHeight - that.data.bgHeight
//console.log("相差高度=" +that.differHeight +" that.MobilePhoneHeigh="+ res.windowHeight+"bgHeight="+that.data.bgHeight)
that.pixelRate = res.windowWidth / 750; that.pixelRate = res.windowWidth / 750;
}, },
}) })
...@@ -223,7 +208,7 @@ ...@@ -223,7 +208,7 @@
}) })
}, },
colorPickTapHandler(obj) { colorPickTapHandler(obj) {
// console.log('我点击的颜色:' + JSON.stringify(obj)); //console.log('我点击的颜色:' + JSON.stringify(obj));
this.colorPanelShow = false; this.colorPanelShow = false;
this.toolArr.forEach(item => { this.toolArr.forEach(item => {
item.select = false; item.select = false;
...@@ -240,7 +225,7 @@ ...@@ -240,7 +225,7 @@
this.drawContext.strokeStyle = obj.color; this.drawContext.strokeStyle = obj.color;
}, },
penWidthChangeHandler(width) { penWidthChangeHandler(width) {
// console.log('画笔宽度:' + width); //console.log('画笔宽度:' + width);
this.lineWidth = width; this.lineWidth = width;
this.drawContext.setLineWidth(width); this.drawContext.setLineWidth(width);
this.drawContext.setLineCap('round') // 让线条圆润 this.drawContext.setLineCap('round') // 让线条圆润
...@@ -254,7 +239,7 @@ ...@@ -254,7 +239,7 @@
break; break;
case 'eraser': case 'eraser':
this.canvas_restore() this.canvas_restore()
// this.drawContext.strokeStyle = 'rgba(255, 255, 255, 0)'; //this.drawContext.strokeStyle = 'rgba(255, 255, 255, 0)';
this.colorPanelShow = false; this.colorPanelShow = false;
break; break;
case 'pen': case 'pen':
...@@ -268,7 +253,7 @@ ...@@ -268,7 +253,7 @@
break; break;
case 'color': case 'color':
this.colorPanelShow = !this.colorPanelShow; this.colorPanelShow = !this.colorPanelShow;
// this.drawMode = this.colorPanelShow ? false : true; //this.drawMode = this.colorPanelShow ? false : true;
break; break;
case 'save': case 'save':
if (that.canvas_neto.length < 1) { if (that.canvas_neto.length < 1) {
...@@ -278,23 +263,8 @@ ...@@ -278,23 +263,8 @@
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'drawCanvas', canvasId: 'drawCanvas',
success: function(res) { success: function(res) {
// console.log('回调参数:' + JSON.stringify(res)) //console.log('回调参数:' + JSON.stringify(res))
that.uploadDIY(res.tempFilePath); that.uploadDIY(res.tempFilePath);
// console.log('回调参数:' + JSON.stringify(res));
// 在H5平台下,tempFilePath 为 base64
// uni.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('成功回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// },
// fail: function(res) {
// console.log('回调参数:' + JSON.stringify(res))
// // console.log('失败回调参数:' + JSON.stringify(res));
// // that.$api.msgSuccess('保存成功');
// }
// });
}, },
fail: function(res) { fail: function(res) {
console.log('fail' + JSON.stringify(res)); console.log('fail' + JSON.stringify(res));
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.$i18n.messages[this.$i18n.locale]['定制蛋糕'] title: this.$i18n.messages[this.$i18n.locale]['定制蛋糕']
}) /* this.$i18n.messages[this.$i18n.locale]['定制手机壳'] */ })
if (options.machine_id && options.machine_id != "null") { if (options.machine_id && options.machine_id != "null") {
......
...@@ -158,10 +158,10 @@ ...@@ -158,10 +158,10 @@
"确认":"confermare", "确认":"confermare",
"取消":"soppressione", "取消":"soppressione",
"搜索":"ricerca", "搜索":"ricerca",
"6寸":"Da 6 pollici", "6寸":"6pollici",
"8寸":"Da 8 pollici", "8寸":"8pollici",
"10寸":"10 pollici", "10寸":"10pollici",
"12寸":"Da 12 pollici", "12寸":"12pollici",
"圆形蛋糕":"Torta rotonda", "圆形蛋糕":"Torta rotonda",
"方形蛋糕":"Torta quadrata", "方形蛋糕":"Torta quadrata",
"自定义尺寸":"personalizzato", "自定义尺寸":"personalizzato",
......
...@@ -158,10 +158,10 @@ ...@@ -158,10 +158,10 @@
"确认":"확인", "确认":"확인",
"取消":"취소", "取消":"취소",
"搜索":"검색", "搜索":"검색",
"6寸":"6 인치", "6寸":"6인치",
"8寸":"8 인치", "8寸":"8인치",
"10寸":"10 인치", "10寸":"10인치",
"12寸":"12 인치", "12寸":"12인치",
"圆形蛋糕":"둥근 케이크", "圆形蛋糕":"둥근 케이크",
"方形蛋糕":"네모난 케이크", "方形蛋糕":"네모난 케이크",
"自定义尺寸":"사용자 정의 크기", "自定义尺寸":"사용자 정의 크기",
......
...@@ -155,11 +155,11 @@ ...@@ -155,11 +155,11 @@
"输入详细地址": "подтверд", "输入详细地址": "подтверд",
"输入邮政编码": "отмен", "输入邮政编码": "отмен",
"输入邮箱": "поиск", "输入邮箱": "поиск",
"确认": "определение", "确认": "подтверждение",
"取消": "8дюйм", "取消": "отмена",
"搜索": "10дюйм", "搜索": "поиск",
"6寸": "12дюйм", "6寸": "6дюймов",
"8寸": "8дюйм", "8寸": "8дюймов",
"10寸": "10дюймов", "10寸": "10дюймов",
"12寸": "12дюймов", "12寸": "12дюймов",
"圆形蛋糕": "торт", "圆形蛋糕": "торт",
......
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>Customized cake</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>Customized cake</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.66947f95.js></script><script src=/static/js/index.a2579006.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.b0707a6a.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.66947f95.js></script><script src=/static/js/index.1845e191.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -158,10 +158,10 @@ ...@@ -158,10 +158,10 @@
"确认":"confermare", "确认":"confermare",
"取消":"soppressione", "取消":"soppressione",
"搜索":"ricerca", "搜索":"ricerca",
"6寸":"Da 6 pollici", "6寸":"6pollici",
"8寸":"Da 8 pollici", "8寸":"8pollici",
"10寸":"10 pollici", "10寸":"10pollici",
"12寸":"Da 12 pollici", "12寸":"12pollici",
"圆形蛋糕":"Torta rotonda", "圆形蛋糕":"Torta rotonda",
"方形蛋糕":"Torta quadrata", "方形蛋糕":"Torta quadrata",
"自定义尺寸":"personalizzato", "自定义尺寸":"personalizzato",
......
...@@ -158,10 +158,10 @@ ...@@ -158,10 +158,10 @@
"确认":"확인", "确认":"확인",
"取消":"취소", "取消":"취소",
"搜索":"검색", "搜索":"검색",
"6寸":"6 인치", "6寸":"6인치",
"8寸":"8 인치", "8寸":"8인치",
"10寸":"10 인치", "10寸":"10인치",
"12寸":"12 인치", "12寸":"12인치",
"圆形蛋糕":"둥근 케이크", "圆形蛋糕":"둥근 케이크",
"方形蛋糕":"네모난 케이크", "方形蛋糕":"네모난 케이크",
"自定义尺寸":"사용자 정의 크기", "自定义尺寸":"사용자 정의 크기",
......
...@@ -155,11 +155,11 @@ ...@@ -155,11 +155,11 @@
"输入详细地址": "подтверд", "输入详细地址": "подтверд",
"输入邮政编码": "отмен", "输入邮政编码": "отмен",
"输入邮箱": "поиск", "输入邮箱": "поиск",
"确认": "определение", "确认": "подтверждение",
"取消": "8дюйм", "取消": "отмена",
"搜索": "10дюйм", "搜索": "поиск",
"6寸": "12дюйм", "6寸": "6дюймов",
"8寸": "8дюйм", "8寸": "8дюймов",
"10寸": "10дюймов", "10寸": "10дюймов",
"12寸": "12дюймов", "12寸": "12дюймов",
"圆形蛋糕": "торт", "圆形蛋糕": "торт",
......
// 开发版 // 开发版
const baseURL = "http://bake.refinecolor.com/api/" //const baseURL = "http://bake.refinecolor.com/api/"
//正式服:bake.colorpark.cn //正式服:bake.colorpark.cn
//测试服:bake.refinecolor.com //测试服:bake.refinecolor.com
//正式版 //正式版
//const baseURL = "https://bake.colorpark.cn/api/" const baseURL = "https://bake.colorpark.cn/api/"
//正式服: //正式服:
//https://tprint.colorpark.cn/ 改成 https://h5.colorpark.cn/api/ //https://tprint.colorpark.cn/ 改成 https://h5.colorpark.cn/api/
......
const Fly = require("flyio/dist/npm/wx") //const Fly = require("flyio/dist/npm/wx")
const Fly = require("flyio/dist/npm/fly")
import Env from './Env' import Env from './Env'
import $n from './nothing' import $n from './nothing'
import store from '../store' import store from '../store'
...@@ -47,9 +48,8 @@ request.interceptors.response.use( ...@@ -47,9 +48,8 @@ request.interceptors.response.use(
// url: '/pages/login/login' // url: '/pages/login/login'
// }) // })
// } // }
// }) // })
// } // }
uni.showModal({ uni.showModal({
title: '', title: '',
content: 'Login timeout, please login again!', content: 'Login timeout, please login again!',
......
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