Commit dffdd6f2 by huahua

修改头获取

parent 0cebc7b6
{
"name" : "mobile-phone-shell-applet",
"name" : "壳小站打印机",
"appid" : "__UNI__AB0E0FC",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"networkTimeout":{
"uploadFile":60000,
"request":60000
},
"networkTimeout" : {
"uploadFile" : 60000,
"request" : 60000
},
"app-plus" : {
/* 5+App特有相关 */
"usingComponents" : true,
......@@ -83,7 +83,7 @@
/* 快应用特有相关 */
"mp-weixin" : {
/* 小程序特有相关 */
"appid" : "wxdca8810ccd426633",
"appid" : "wx3d8b992243f6e678",
"setting" : {
"urlCheck" : true,
"postcss" : true,
......@@ -98,9 +98,9 @@
"desc" : "获取当前位置"
}
},
"requiredPrivateInfos": ["getLocation","chooseAddress"]
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ]
},
//"requiredPrivateInfos": ["getLocation","chooseAddress"],
//"requiredPrivateInfos": ["getLocation","chooseAddress"],
// "navigateToMiniProgramAppIdList":[ "wx55b5b6d95c648041"]
"h5" : {
"devServer" : {
......
{
"pages": [{
"pages": [
{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "色彩公园手机壳",
......@@ -15,6 +16,12 @@
}
},
{
"path": "pages/index/nick-name",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/index/start-up",
"style": {
"navigationBarTitleText": "打印",
......@@ -119,6 +126,7 @@
"navigationBarTitleText": "商品尺码"
}
}
]
}
]
......
......@@ -2,17 +2,42 @@
<uni-popup ref="Signincenter" type="bottom">
<view class='dialog-container'>
<!-- 遮罩 -->
<view style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;"></view>
<view style="width: 100%; height: 440upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; ">
<view @click="cose()" style="position: absolute; top: 0; right: 0;">
<image style="height: 30upx; width: 30upx; margin: 20upx;" src="../../static/icon_guanbi.png" mode=""></image>
<view
style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;">
</view>
<view
style="width: 100%; height: 1100upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; ">
<view @click="cose()" style="position: absolute; top: 0; right: 0;">
<image style="height: 30upx; width: 30upx; margin: 20upx;" src="../../static/icon_guanbi.png"
mode=""></image>
</view>
<image src="../../static/logo.jpg" mode="aspectFill"
style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image>
<view style=" text-align: center; font-size: 32upx; font-weight: 500; color: #131319;">
欢迎来到{{startText}}小程序 </view>
<view
style=" margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;">
为了更好的服务,需要得到您的授权 </view>
<view class="avatarUrl">
<button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
<image :src="avatarUrl" class="refreshIcon"></image>
</button>
</view>
<view class="nickname">
<text>昵称:</text>
<input type="nickname" class="weui-input" :value="nickName" @blur="bindblur" placeholder="请输入昵称"
@input="bindinput" />
</view>
<view class="btn">
<view class="btn-sub" @tap="getUserProfile">保存</view>
</view>
<image src="../../static/logo.jpg" mode="aspectFill" style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image>
<view style=" text-align: center; font-size: 32upx; font-weight: 500; color: #131319;"> 欢迎来到{{startText}}小程序 </view>
<view style=" margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;"> 为了更好的服务,需要得到您的授权 </view>
<!-- 小程序登录、用户信息相关接口调整 -->
<button class="buttonGetUserInfo cssbut" hover-class="hover-class-bg" v-if="canIUseGetUserProfile" @tap="getUserProfile"> 获取头像昵称 </button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN" class="buttonGetUserInfo cssbut" hover-class="hover-class-bg"> 获取头像昵称 </button>
<!--小程序登录、用户信息相关接口调整 -->
<!-- <button class="buttonGetUserInfo cssbut" hover-class="hover-class-bg" v-if="canIUseGetUserProfile" @tap="getUserProfile"> 获取头像昵称 </button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN" class="buttonGetUserInfo cssbut" hover-class="hover-class-bg"> 获取头像昵称 </button> -->
</view>
</view>
</uni-popup>
......@@ -27,191 +52,295 @@
uniPopup
},
computed: {
startText(){
startText() {
return Env.getmalltext() || '色彩公园'
},
},
data() {
return {
canIUseGetUserProfile: false,
avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
nickName: ''
};
},
methods: {
cose(){
this.$refs['Signincenter'].close()
},
init(){
this.$nextTick(() => {
this.$refs['Signincenter'].open()
})
if (wx.getUserProfile) {
this.canIUseGetUserProfile = true
}
},
getUserProfile(e) {
uni.getSetting({
success(res){
console.log('获取用户信息是否用户同意')
console.log(res.authSetting)
}
})
let that = this;
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
lang:'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true});
uni.login({
provider: 'weixin',
success: (weixinres) => {
//console.log('uni.login')
//console.log(weixinres)
if (weixinres.code) {
that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData;
that.loginInfo.iv = Userres.iv;
that.loginInfo.code = weixinres.code;
userService.setWxInfo(that.loginInfo);
userService.cacheWxInfo(that.loginInfo);
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName || '微信用户',
gender:that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
}).then(result => {
uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'});
// that.$emit('ok', true);
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg,icon: 'none'});
})
} else {
uni.hideLoading();
console.log('登录失败!' + res.errMsg)
uni.showToast({title: '登录失败!',icon: 'none'});
}
},
fail: (err) => {
uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'});
}
})
},
fail(err) {
uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'});
}
})
},
getUserInfo(e) {
uploadFile(filePath) {
let that = this;
// 已经授权,可以直接调用 getUserInfo 获取头像昵称
uni.getUserInfo({
success(Userres) {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true});
uni.login({
provider: 'weixin',
success: (weixinres) => {
console.log('uni.login')
console.log(weixinres)
if (weixinres.code) {
that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData;
that.loginInfo.iv = Userres.iv;
that.loginInfo.code = weixinres.code;
userService.setWxInfo(that.loginInfo);
userService.cacheWxInfo(that.loginInfo);
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName,
gender:that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
}).then(result => {
uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'});
// that.$emit('ok', true);
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg,icon: 'none'});
uni.request({
url: Env.getDevBaseURL() + '/api/AliossSign/getSign',
method: 'GET',
data: '',
header: {
'content-type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
},
success: function(res) {
var atter = res.data
let time = new Date().getTime() + Math.floor((Math.random() * 1000) + 1)
uni.uploadFile({
url: atter.host.replace("http:", "https:"),
filePath: filePath,
name: 'file',
formData: {
'key': atter.dir + time + '.jpg',
'OSSAccessKeyId': atter.accessid,
'policy': atter.policy,
'Signature': atter.signature,
'success_action_status': '200',
'callback': atter.callback,
},
success: res => {
var imageUrl = atter.host + '/' + atter.dir + time +'.jpg'
that.avatarUrl = imageUrl;
},
fail: e => {
uni.showToast({
icon: 'none',
title: '上传失败'
})
} else {
uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'});
}
}
});
},
});
},
bindblur(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
bindinput(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
onChooseavatar(e) {
console.log(e);
this.avatarUrl = e.detail.avatarUrl;
this.uploadFile(this.avatarUrl);
},
cose() {
this.$refs['Signincenter'].close()
},
init() {
this.$nextTick(() => {
this.$refs['Signincenter'].open()
})
if (wx.getUserProfile) {
this.canIUseGetUserProfile = true
}
},
getUserProfile(e) {
if (this.nickName === '') {
uni.showToast({
icon: 'none',
title: '请输入昵称'
})
return false;
}
uni.getSetting({
success(res) {
//console.log('获取用户信息是否用户同意')
//console.log(res.authSetting)
}
})
let that = this;
wx.getUserProfile({
lang: 'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => {
that.$base.Userres = Userres
uni.showLoading({
title: '正在登录中...',
mask: true
});
uni.login({
provider: 'weixin',
success: (weixinres) => {
console.log(weixinres)
if (weixinres.code) {
that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData;
that.loginInfo.iv = Userres.iv;
that.loginInfo.code = weixinres.code;
userService.setWxInfo(that.loginInfo);
userService.cacheWxInfo(that.loginInfo);
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.nickName || '微信用户',
gender: that.loginInfo.gender,
portrait: that.avatarUrl,
encryptedData: that.loginInfo.encryptedData,
iv: that.loginInfo.iv,
promoter_id: that.$base
.promoter_id, // 推广的员的编号
machine_id: that.$base
.machine_id, //用户进入设备id
}).then(result => {
uni.setStorageSync('token', result.token)
uni.hideLoading();
uni.showToast({
title: '登录成功',
icon: 'none'
});
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({
title: err.msg,
icon: 'none'
});
})
} else {
uni.hideLoading();
uni.showToast({
title: '登录失败!',
icon: 'none'
});
}
},
fail: (err) => {
uni.hideLoading();
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
})
},
fail: (err) => {
fail(err) {
uni.hideLoading();
console.error('授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'});
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
}
})
},
fail(err) {
uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'});
}
})
},
// 打开权限设置页提示框
showSettingToast(e) {
const that = this
wx.showModal({
title: '温馨提示',
content: '为了更好体验小程序,请开启微信授权',
confirmText: '去设置',
showCancel: false,
success: function(res) {
if (res.confirm) {
// /打开授权设置
uni.openSetting({
success(res) {
if (res.authSetting['scope.userInfo']) {
that.getUserInfo(e)
} else {
that.showSettingToast(e)
getUserInfo(e) {
let that = this;
//已经授权,可以直接调用 getUserInfo 获取头像昵称
uni.getUserInfo({
success(Userres) {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({
title: '正在登录中...',
mask: true
});
uni.login({
provider: 'weixin',
success: (weixinres) => {
console.log('uni.login')
console.log(weixinres)
if (weixinres.code) {
that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData;
that.loginInfo.iv = Userres.iv;
that.loginInfo.code = weixinres.code;
userService.setWxInfo(that.loginInfo);
userService.cacheWxInfo(that.loginInfo);
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName,
gender: that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData: that.loginInfo.encryptedData,
iv: that.loginInfo.iv,
promoter_id: that.$base
.promoter_id, // 推广的员的编号
machine_id: that.$base
.machine_id, //用户进入设备id
}).then(result => {
uni.hideLoading();
uni.showToast({
title: '登录成功',
icon: 'none'
});
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({
title: err.msg,
icon: 'none'
});
})
} else {
uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(
err));
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
},
fail: (err) => {
uni.hideLoading();
console.error('授权登录失败:' + JSON.stringify(err));
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
},
fail(err) {
console.log(err)
})
},
fail(err) {
uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
}
})
},
//打开权限设置页提示框
showSettingToast(e) {
const that = this
wx.showModal({
title: '温馨提示',
content: '为了更好体验小程序,请开启微信授权',
confirmText: '去设置',
showCancel: false,
success: function(res) {
if (res.confirm) {
//打开授权设置
uni.openSetting({
success(res) {
if (res.authSetting['scope.userInfo']) {
that.getUserInfo(e)
} else {
that.showSettingToast(e)
}
},
fail(err) {
console.log(err)
}
})
}
})
}
}
})
},
onLoad() {},
}
}
}
})
},
onLoad() {
},
}
}
</script>
<style lang="scss">
@import "./css/main.css";
/* 去除button默认样式 */
.cssbut {
background-color: transparent !important;
......@@ -220,25 +349,90 @@
line-height: inherit !important;
border-radius: 0 !important;
}
.cssbut::after {
border: none !important;
}
/* 弹框 */
.dialog-container {
width: 100%;
height: 100%;
background: #fff;
}
.buttonGetUserInfo{
text-align: center !important;
margin: 49upx auto 0 !important;
line-height: 70upx !important;
width: 400upx !important;
.buttonGetUserInfo {
text-align: center !important;
margin: 49upx auto 0 !important;
line-height: 70upx !important;
width: 400upx !important;
height: 70upx !important;
background: #F56364 !important;
border-radius: 35upx !important;
border: 0 !important;
font-size: 36upx !important;
font-weight: 400 !important;
color: #FFFFFF !important;
background: #F56364 !important;
border-radius: 35upx !important;
border: 0 !important;
font-size: 36upx !important;
font-weight: 400 !important;
color: #FFFFFF !important;
}
.avatarUrl {
padding: 80upx 0 40upx;
background: #EEE;
button {
background: #EEE;
line-height: 80upx;
height: auto;
width: auto;
padding: 20upx 30upx;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
.refreshIcon {
width: 160upx;
height: 160upx;
border-radius: 50%;
}
.jt {
width: 14upx;
height: 28upx;
}
}
}
//botton 去除边框
button::after {
border: none;
}
.nickname {
background: #EEE;
padding: 20upx 30upx 80upx;
display: flex;
align-items: center;
justify-content: center;
.weui-input {
padding-left: 60upx;
}
}
.btn {
width: 100%;
.btn-sub {
width: 670upx;
margin: 80upx auto 0;
height: 90upx;
background: #DF8585;
border-radius: 45upx;
line-height: 90upx;
text-align: center;
font-size: 36upx;
color: #fff;
}
}
</style>
</style>
\ No newline at end of file
......@@ -23,16 +23,17 @@
<!-- 设计区域 -->
<view v-show="!state" class="full-width content-color full-height" :style="{background: design_color }">
<view class="full-width full-height" style="position: absolute; top: 0; left: 0;" @click.stop="itemCancel">
</view>
<view class="container" :style="{height: data.windowHeight + 'px'}" @touchmove.stop="touchMove"
@touchend.stop="touchEnd" @click.stop="itemCancel">
<view class="full-width full-height" style="position: absolute; top: 0; left: 0;" @click.stop="itemCancel"></view>
<view class="container" :style="{height: data.windowHeight + 'px'}" @touchmove.stop="touchMove" @touchend.stop="touchEnd" @click.stop="itemCancel">
<!-- 辅助线 -->
<view v-if="guide_left"
style="border-left: 1px dashed #864BC3;position: absolute; height: 100%; z-index: 999; left: calc(50% - 0.5px);">
</view>
<view :style="{width: data.bgWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + translateX + 'px) scale(' + transformscale + ')',
<view :style="{width: data.bgWidth +'px',height: data.editorHeight +'px',transform: 'translateX(' + translateX + 'px) scale(' + transformscale + ')',
'-webkit-transform': 'translateX(' + translateX + 'px) scale(' + transformscale + ')'}"
:class="{translateXClass:translateX >= 0}"
style="position: relative;transition: all 1s; -webkit-transition: all 1s;">
......@@ -47,13 +48,6 @@
style="overflow: hidden;"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px' ,clipPath: 'inset(' + clipButtom + 'px ' + clipRight + 'px ' + clipTop + 'px ' + clipLeft + 'px round ' + filletSize + 'px)' }">
<!-- 定制壳底图 -->
<image v-if="data.loadbgImageheightstate && !isCustomize"
:src="background_surface_image + '?x-oss-process=image/resize,lfit,w_400'" mode=""
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 0;">
</image>
<view v-if=" isCustomizeComplete && isCustomize"
:style="{width: real_print_width +'px',height: real_print_height +'px', borderRadius: filletSize + 'px'}"
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 0; background: #fff;">
......@@ -65,13 +59,13 @@
</view>
<!-- 白底图 -->
<view v-if="data.loadbgImageheightstate"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',background:background_color ? background_color : 'none'}"
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 0;">
</view>
<view
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',background: (background_color && background_color != 'none' && background_color != null ) ? background_color : '#fff'}"
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 0; ">
</view>
<view
:style="{'margin-top': (data.editorHeight * (1 - mix_scale) / 2) +'px',width: data.editorWidth * mix_scale +'px',height: data.editorHeight * mix_scale +'px','mask-image':shape_image ? 'url(' + shape_image + ')' : 'none', '-webkit-mask-image':shape_image ? 'url(' + shape_image + ')' : 'none',}"
:style="{'margin-top': (data.editorHeight * (1 - mix_scale) / 2) +'px',width: data.editorWidth * mix_scale +'px',height: data.editorHeight * mix_scale +'px','mask-image':shape_image ? 'url(' + shape_image + ')' : 'none', '-webkit-mask-image':shape_image ? 'url(' + shape_image + ')' : 'none',}"
style="overflow: hidden; mask-size: 100%;
-webkit-mask-size: 100%;margin-left:auto;
margin-right: auto;
......@@ -115,21 +109,67 @@
</block>
</view>
<!-- <view
style="position: absolute;z-index: 9;top: 0px; bottom: 0; left: 0px; right: 0px;margin: auto; "
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight + 1) +'px', visibility : !isCustomize ? 'visible' : 'hidden' }">
</view> -->
<!-- 手机壳图 -->
<image :src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400' " mode=""
@load="loadbgImage"
style="position: absolute;z-index: 9;top: -1px; bottom: 0; left: -1px; right: 0;margin: auto; "
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight + 1) +'px', visibility : !isCustomize ? 'visible' : 'hidden' }">
style="position: absolute;
z-index: 9;
top: 0px;
bottom: 0;
left: 0px;
right: 0px;
margin: auto;"
:style="{width: (data.editorWidth ) +'px',height: (data.editorHeight ) +'px', visibility : !isCustomize ? 'visible' : 'hidden' }">
</image>
<!-- 旧——手机壳图 -->
<image :animation="translateHide "
:src="data.bgImage_old + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 9;top: -1px; bottom: 0; left: -1px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight + 1) +'px'}">
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 10;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight ) +'px'}">
</image>
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 11;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight ) +'px'}">
</image>
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 12;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight ) +'px'}">
</image>
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 13;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight ) +'px'}">
</image>
</view>
<!-- <view
style="position: absolute;
z-index: 10;
top: 0px;
bottom: 0;
left: 0px;
right: 0px;
margin: auto;
border: 1upx solid #fff;
background: #00000000;"
:style="{width: (data.editorWidth ) +'px',height: (data.editorHeight ) +'px' }">
</view> -->
<!-- 操作列表 ,top: editory +'px' v-if="editory" front_image_long-->
<view v-if="front_image_long" :class="['operate-list', { 'list-active': data.listActive == true }]"
......@@ -346,7 +386,6 @@
</image>
<view class="tool_li_text">背景底色</view>
</view>
<!-- v-if="system_config.phone_diy.value == 1 && surface_type != 1 && diy_upload_menu == 1" -->
<view class="tool_li" @click="showone = !showone">
<image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""
......@@ -407,7 +446,6 @@
</view>
</view>
<!-- 切换手机 :style="{ top: textHeight + 'px'}"-->
<view :animation="functionHide" v-if="!active && !guide_left " @click="topagecategory(0)"
style="z-index: 99;position: fixed; left: 12upx; opacity: 0; top: 200upx;">
<image style="width: 120upx; height: 150upx; display: block; margin: auto;"
......@@ -425,6 +463,7 @@
font-size: 20upx;
margin-top: 10upx;">移除图片</view>
</view>
<view :animation="functionHide" class="toolLeft" style="margin-left: 10upx; margin-top: 130upx"
v-if="(background_color && background_color != 'none') && (surface_type == 0 || surface_type == 2) && !guide_left"
@click.stop="eliminateBackgroundColor()">
......@@ -432,7 +471,6 @@
height: 50upx;
display: block;
margin: auto;" src="../../static/diy_icon_replace_default.png" mode=""></image>
<!-- class="tool_li_text" -->
<view style="text-align: center;
color: #F56364;
font-size: 20upx;
......@@ -823,7 +861,7 @@
deleteTop: 0,
deleteWrap: false, //拖拽删除图库
delete_wrap_state: true, //拖拽删除图库
translateX: -400,
translateX: -800,
translateXState: 1,
translateLeft: null,
translateHide: null,
......@@ -4104,7 +4142,7 @@
snapshot.pop();
}
}
// 加入快照
//加入快照
snapshot.push(currentSnapshot);
snapshotIndex = snapshotIndex + 1;
}
......@@ -4240,7 +4278,6 @@
this.saveSnapshot();
break;
}
}
}
}
......@@ -4270,7 +4307,6 @@
//获取自定义产品数据详情
getCustomDetail() {
this.isReady = false;
//this.front_image_long = false
this.front_image_long = true
homeservice.queryList({
s: 'Product.getCustomize',
......@@ -4306,7 +4342,6 @@
if (this.$base.surfaceData.surface_type == 0 || this.$base.surfaceData.surface_type == 2) { //默认
this.background_color = 'none' //手机底色
//this.background_surface_image = result.surface_pic
}
this.$base.goods_feature_id = result.goods_feature_id
this.mix_scale = result.mix_scale //上传图片比率
......@@ -4407,7 +4442,6 @@
//获取产品详情数据
goodslist() {
this.isReady = false;
//this.front_image_long = false
this.front_image_long = true
homeservice.queryList({
s: 'Product.detail',
......@@ -4418,18 +4452,11 @@
uni.getImageInfo({
src: result.front_image,
success: (front_image) => {
this.data.bgHeight = front_image.height * (this.data.bgWidth / front_image
.width) // 画布高度
this.editory = result.center_scale * (this.data.bgWidth / front_image
.width) //辅助线距离
this.data.bgHeight = front_image.height * (this.data.bgWidth / front_image.width) // 画布高度
this.editory = result.center_scale * (this.data.bgWidth / front_image.width) //辅助线距离
this.front_image_long = true
},
fail(err) {
// uni.showToast({
// icon: "none",
// title: "网络超时,请重试",
// duration: 2000
// });
this.front_image_long = true
}
})
......@@ -4439,9 +4466,7 @@
}) //修改头部名称
this.data.bgImage = result.front_image // 背景图
this.data.bgImage_old = result.front_image_old // 旧背景图
if (this.$base.surfaceData.surface_type == 0 || this.$base.surfaceData.surface_type ==
2) { //默认
if (this.$base.surfaceData.surface_type == 0 || this.$base.surfaceData.surface_type == 2) { //默认
this.background_color = 'none' //手机底色
this.background_surface_image = result.surface_pic
}
......@@ -4474,8 +4499,8 @@
//进入页面动画
if (this.translateX != 0) {
// 初始化位置
this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth)
//this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
//this.translateX = - 800
// 手机壳缓缓移动进入 1s
setTimeout(function() {
this.translateX = 0
......@@ -4534,21 +4559,12 @@
this.isReady = false;
}.bind(this), 4000)
}
}).catch(err => {
this.goodslistAgain();
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
//获取产品详情数据
goodslistAgain() {
this.isReady = false;
......@@ -4584,8 +4600,7 @@
}) //修改头部名称
this.data.bgImage = result.front_image // 背景图
this.data.bgImage_old = result.front_image_old // 旧背景图
if (this.$base.surfaceData.surface_type == 0 || this.$base.surfaceData.surface_type ==
2) { //默认
if (this.$base.surfaceData.surface_type == 0 || this.$base.surfaceData.surface_type == 2) { //默认
this.background_color = 'none' //手机底色
this.background_surface_image = result.surface_pic
}
......@@ -4616,8 +4631,7 @@
//进入页面动画
if (this.translateX != 0) {
// 初始化位置
this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth)
this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
// 手机壳缓缓移动进入 1s
setTimeout(function() {
this.translateX = 0
......@@ -4681,7 +4695,6 @@
});
},
//查询贴纸跟壁纸系列
category(type) {
if (type == 2) {
......@@ -5031,7 +5044,7 @@
this.translateX = 0;
} else {
this.isCustomize = false;
this.translateX = -400;
this.translateX = -800;
}
}
if (options.machine_id != undefined) { // 判断是从设备进来
......
<template>
<view class="full-width">
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
<!-- 自定义头部 -->
<view class='flex commonHead' :style="{height: titleHeight +'px'}">
<view class='commonHead-wrap flex'>
<view class='commonHead_left' @click="tomine()">
<view class='commonHead_left_back'>
<view class="commonHead_left_back_img">
<image :src="portraitUrl" style="width: 50upx; height: 50upx; border-radius: 30upx; margin-top: 10upx; background: #FFFFFF; "
mode="aspectFill"></image>
<image :src="portraitUrl" style="width: 50upx; height: 50upx; border-radius: 30upx; margin-top: 10upx; background: #FFFFFF;" mode="aspectFill"></image>
</view>
</view>
</view>
......@@ -44,41 +47,8 @@
<!-- 有设备 -->
<view v-if="LoupanList.length > 0">
<view style="margin-top: 29upx;">
<view style="width: 690upx; margin:30upx auto 30upx; display: flex;">
<view>
<view style="position: relative; width: 320upx; height: 160upx;" @click="order()">
<image src="../../static/main/dingdan@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
订单</view>
<view style="margin-top: 15upx;margin-left:26upx;font-size: 24upx;
font-weight: 400; color: #FFFFFF;">我的定制</view>
</view>
<view style="margin-top: 16upx; position: relative;width: 320upx; height: 160upx;"
@click="coupons()">
<image src="../../static/main/huayihua@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
滑一滑</view>
</view>
</view>
<view style="margin-left: 15upx;width: 350upx; height: 340upx;" @click="tomine()">
<image src="../../static/main/wo@3x.png" mode=""
style="width: 350upx; height: 340upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:30upx; padding-top: 39upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
个人中心</view>
<view style="margin-top: 15upx;margin-left:30upx;font-size: 24upx;
font-weight: 400; color: #FFFFFF;">更多作品更多精彩</view>
</view>
</view>
<!-- v-if="system_config.phone_diy.value == 0" -->
<view v-if="system_config.phone_diy.value == 0" @tap="doubleTap" @touchstart="touchStart"
@touchend="touchEnd"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
@touchend="touchEnd"style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center; width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>定制</view>
<view>体验</view>
......@@ -106,7 +76,6 @@
</view>
<view style="margin: 28upx 0 10upx;">
<!-- 设备状态 0:离线 1:正常 2:生产中 3:故障 4:调试 5:升级中 -->
<!-- 正常、打印中:正在定制,其他的都是:休息中 -->
<text v-if="item.status.value == 0" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<text v-if="item.status.value == 1" class="statuslist"
......@@ -225,19 +194,23 @@
})
}
},
swiperChange(e) {
this.currentSwiper = e.detail.current
},
experience() {
uni.navigateTo({
url: '../mall/experience'
})
},
tomyorder() { //订单列表
uni.navigateTo({
url: '../mine/myorder'
})
},
toLocation(item) {
uni.showLoading({
title: '导航加载中...'
......@@ -258,6 +231,7 @@
}
});
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
......@@ -289,7 +263,6 @@
},
order() {
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
......@@ -308,14 +281,13 @@
}
})
},
/* path: '/pages/login/coupons', */
coupons() {
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
//console.log("envVersionName="+envVersionName);
wx.navigateToMiniProgram({
appId: Env.getappId(),
path: '/pages/index/recommend?selectTitleType=2',
......@@ -328,6 +300,7 @@
}
})
},
tomine() {
wx.navigateToMiniProgram({
appId: this.$Env.getappId(),
......@@ -342,13 +315,16 @@
}
})
},
// 防止重复点击
//防止重复点击
touchStart(e) {
this.touchStartTime = e.timeStamp;
},
touchEnd(e) {
this.touchEndTime = e.timeStamp;
},
doubleTap(e) {
// 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件
if (this.touchEndTime - this.touchStartTime < 350) {
......@@ -359,29 +335,31 @@
this.lastTapTime = currentTime;
// 如果两次点击时间在300毫秒内,则认为是双击事件
if (currentTime - lastTapTime > 300) {
// console.log('防止重复点击')
if (!this.$AppContext.checkLogin()) {
//console.log('防止重复点击')
// uni.navigateTo({
// url: './nick-name?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
// });
if(!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
// this.showOrHide()
// uni.navigateTo({url: '/pages/index/index?goods_id=21'})
uni.navigateTo({
uni.navigateTo({
url: './start-up?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
});
}
});
}
}
}
},
// 加载数据
//加载数据
loadGoodsList() {
uni.showLoading({
title: '正在加载中...'
})
homeservice.queryList({
s: 'Machine.shopList',
longitude: this.$base.longitude || 0,
/*longitude: this.$base.longitude || 0,
latitude: this.$base.latitude || 0,
distance: 5,
distance: 5, */
}).then(result => {
this.long = true
result.data.forEach(item => {
......@@ -393,12 +371,9 @@
}).catch(err => {
uni.hideLoading();
uni.stopPullDownRefresh();
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
Account_newOrder() {
homeservice.queryList({
s: 'Account.newOrder'
......@@ -411,33 +386,19 @@
uni.stopPullDownRefresh();
}).catch(err => {
uni.stopPullDownRefresh();
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
getSetting() {
this.loadGoodsList()
// const that = this
// uni.getSetting({
// success(res) {
// if (res.authSetting['scope.userLocation']) { //同意
// that.getLocation()
// } else { //拒绝
// that.getAuthorize()
// }
// }
// })
},
// 获取用户的地理位置,
//获取用户的地理位置,
getAuthorize() {
//uni.hideLoading();
// uni.showToast({title: '操作太频繁了,歇一歇',icon:'none',duration: 2000});
this.loadGoodsList()
},
// 用户授权
//用户授权
getAuthorize() {
const that = this
uni.authorize({
......@@ -467,15 +428,15 @@
}
})
},
// 设备详情
//设备详情
goMachineDetail(item) {
uni.navigateTo({
//url: './start-up?machine_id=' + item.id + '&worksid=0'
url: './start-up?machine_id=' + item.id + '&worksid=0'
});
},
tologo(e) {
// 先登陆
let that = this;
uni.login({
provider: 'weixin',
......@@ -487,31 +448,24 @@
that.Account_newOrder();
if (e == 'navigateTo') {
uni.navigateTo({
url: './start-up?machine_id=' + that.$Env.getmachineId() +
'&worksid=0'
url: './start-up?machine_id=' + that.$Env.getmachineId() +'&worksid=0'
});
}
}).catch(err => {
that.$refs.Signin.init()
// uni.showToast({title: err.msg,icon: 'none'})
//console.log(that.$refs.Signin)
//that.$refs.Signin.getUserProfile()
//getUserProfile
//that.$refs.Signin.init()
});
},
fail: (res) => {
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
}
});
},
phone_mall() {
// homeservice.queryList({s: 'Ad.list',ad_position_key: 'phone_mall'}).then(result => {
// this.Adlists = result
// uni.stopPullDownRefresh();
// }).catch(err => {
// uni.stopPullDownRefresh();
// uni.showToast({title: err.msg,icon: 'none'});
// });
},
systemConfig() {
var _this = this
......@@ -588,7 +542,6 @@
if (appUser != null) {
this.portraitUrl = appUser.portrait
}
},
onShow() {
let sys = this.$base.appInformation ? this.$base.appInformation : wx.getSystemInfoSync(); // 自定义页头适配
......
<template>
<view class="containar">
<view class="avatarUrl">
<button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
<image :src="avatarUrl" class="refreshIcon"></image>
</button>
</view>
<view class="nickname">
<text>昵称:</text>
<input type="nickname" class="weui-input" :value="nickName" @blur="bindblur" placeholder="请输入昵称"
@input="bindinput" />
</view>
<view class="btn">
<view class="btn-sub" @click="onSubmit">保存</view>
</view>
</view>
</template>
<script>
import Env from '@/util/Env.js';
export default {
data() {
return {
avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
nickName: ''
};
},
onLoad(option) {
},
methods: {
bindblur(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
bindinput(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
onChooseavatar(e) {
this.avatarUrl = e.detail.avatarUrl;
},
onSubmit() {
if (this.nickName === '') {
uni.showToast({
icon: 'none',
title: '请输入昵称'
})
return false;
}
uni.showLoading({
title: '头像上传中...'
});
// uni.request({
// url: Env.getDevBaseURL() + '/api/AliossSign/getSign',
// method: 'GET',
// data: '',
// header: {
// 'content-type': 'application/x-www-form-urlencoded',
// 'Accept': 'application/json'
// },
// success: function(res) {
// },
// });
}
},
};
</script>
<style lang="scss">
.containar {
.avatarUrl {
padding: 80upx 0 40upx;
background: #fff;
button {
background: #fff;
line-height: 80upx;
height: auto;
width: auto;
padding: 20upx 30upx;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
.refreshIcon {
width: 160upx;
height: 160upx;
border-radius: 50%;
}
.jt {
width: 14upx;
height: 28upx;
}
}
}
//botton 去除边框
button::after {
border: none;
}
.nickname {
background: #fff;
padding: 20upx 30upx 80upx;
display: flex;
align-items: center;
justify-content: center;
.weui-input {
padding-left: 60upx;
}
}
.btn {
width: 100%;
.btn-sub {
width: 670upx;
margin: 80upx auto 0;
height: 90upx;
background: #DF8585;
border-radius: 45upx;
line-height: 90upx;
text-align: center;
font-size: 36upx;
color: #fff;
}
}
}
</style>
\ No newline at end of file
......@@ -9,15 +9,6 @@
</view>
</view>
<view @tap="toProxyApplet" v-if="list.is_open_manage == 1"
style="position: fixed; z-index: 99; right: 0; bottom: 400upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>运营</view>
<view>中心</view>
</view>
</view>
<!-- 自定义头部 -->
<myhead :worksid="worksid" :title="myheadtext" :color="'#864BC3'" :titleShow="true" :backShow="true"
:background="'none'"></myhead>
......@@ -46,13 +37,6 @@
width: 420upx; height: 105upx; line-height: 105upx; border-radius: 53upx; font-size: 39upx;">
立即定制
</view>
<!-- <view @click="toProxyApplet()" v-if="list.is_open_manage == 1" style="position: fixed; bottom: 35upx;
text-align: center;left: 0; right: 0;font-size: 34upx;
margin: auto;
color: #fff;
line-height:64upx;
background: linear-gradient(to left, #834DC4, #1983D7);
width: 240upx; height: 60upx; border-radius: 30upx;">运营中心</view> -->
</view>
<!-- 错误提示信息 -->
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
......@@ -335,7 +319,14 @@
userService.login({
s: 'Init.init',
code: res.code
}).then(r => {
}).then(result => {
uni.setStorageSync('token', result.token)
/* uni.setStorage({
})
*/
that.getSetting();
}).catch(err => {
that.$refs.Signin.init();
......@@ -478,7 +469,11 @@
this.isNowCustomized = false;
}.bind(this), 3000)
let that = this;
if (!this.$AppContext.checkLogin()) {
this.tologo()
console.log(this.$AppContext.checkLogin());
/* if (!this.$AppContext.checkLogin()) {
this.tologo()
} else {
if (this.list != null) {
......@@ -508,7 +503,7 @@
} else {
}
}
} */
},
changeChannel() {
......
......@@ -16,16 +16,16 @@
<text style="margin-left: 13upx;">微信一键登录</text>
</button> -->
<!-- 小程序登录、用户信息相关接口调整 -->
<button class="buttonGetUserInfo" hover-class="hover-class-bg" v-if="canIUseGetUserProfile"
<button class="buttonGetUserInfo" hover-class="hover-class-bg"
@tap="getUserProfile">
<image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image>
<text style="margin-left: 13upx;">获取头像昵称</text>
<!-- <image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image> -->
<text style="margin-left: 13upx;">登录</text>
</button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN"
<!-- <button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN"
class="buttonGetUserInfo" hover-class="hover-class-bg">
<image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image>
<text style="margin-left: 13upx;">获取头像昵称</text>
</button>
</button> -->
</view>
<image src="../../static/logo.jpg" mode="aspectFill" class="logoimage"></image>
</view>
......@@ -93,15 +93,9 @@
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName || '微信用户',
gender:that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
}).then(result => {
uni.hideLoading();
uni.setStorageSync('token', result.token)
uni.showToast({title: '登录成功',icon: 'none'});
if (that.code) {
uni.redirectTo({
......@@ -242,8 +236,8 @@
}
},
onShow() {
console.log('wx.getUserProfile')
console.log(wx.getUserProfile)
//console.log('wx.getUserProfile')
//console.log(wx.getUserProfile)
if (wx.getUserProfile) {
console.log('wx.getUserProfile可以使用')
this.canIUseGetUserProfile = true
......
......@@ -21,12 +21,12 @@
<view v-if="designer.user_id != userId" class="border-image-pesudo-no">
<view class="border-image-pesudo-in-no">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<image style="width: 100%;height: 100%;" src="../../static/img/icon_line_up_back.png"
mode="aspectFit"></image>
<image
......@@ -42,34 +42,32 @@
<view v-if="designer.user_id == userId" class="border-image-pesudo">
<view class="border-image-pesudo-in">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<image style="width: 100%;height: 100%;" src="../../static/img/icon_line_up_back.png"
mode="aspectFit"></image>
mode="aspectFit"></image>
<image
style="width: 141upx; height: 132upx; margin:auto; display: block;position: absolute; z-index: 10;"
:src="designer.front_image" mode="aspectFit"></image>
style="width: 141upx; height: 132upx; margin:auto; display: block;position: absolute; z-index: 10;"
:src="designer.front_image" mode="aspectFit"></image>
<image
style="width: 141upx; height: 132upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit">
style="width: 141upx; height: 132upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit">
</image>
</view>
</view>
<view style="width: calc(100% - 360upx);">
<view style="width: 90%;font-size: 28upx;">
<text style="font-size: 40upx;font-weight: bold;">{{designer.id || ''}}</text>
</view>
<view style="font-size: 24upx; color: #FFFFFF; margin-top: 30upx;">
{{designer.goods_name || ''}}
{{designer.goods_name || ''}}
</view>
<!-- <view style="font-size: 24upx; color: #FFFFFF; margin-top: 10upx;">{{designer.goods_specs || ''}}</view> -->
</view>
<view style="margin-right: 20upx; margin-left: auto; padding-top:75upx">
<view v-if="designer.status.value == 1"
......@@ -96,59 +94,13 @@
</view>
</view> -->
</view>
</view>
</view>
<!-- 提示 -->
<view v-if="sighstate">
<view
style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;"
@click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 0; left: 0; bottom: 0; right: 0; margin: auto;
width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click.stop="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
</view>
<view style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<!-- <view
style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;flex-direction: column;"> -->
<!-- <image src="../../static/icon_paidui.png" mode="aspectFill"
style="width: 154upx; height: 154upx; margin: auto;"></image> -->
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_150'"
mode="aspectFit" style="width:150upx; "></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_150'"
mode="aspectFit" style=" width: 150upx; margin-left: -150upx; "></image>
<!-- </view> -->
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 5upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
<!-- 查看详情 -->
<!-- <view style="width: 100%;" >
<view style="width: 136upx; height: 60upx;background: #E7BC15;border-radius: 30upx; color: #FFFFFF; text-align: center; ">查看详情</view>
</view> -->
</view>
</view>
</view>
</view>
</view>
<!-- 提示完 -->
</view>
</view>
</view>
</template>
......@@ -173,7 +125,6 @@
machine_id: null,
page: 1,
per_page: 15,
// total: 0
},
stateindex: false,
key: null, //1直营配送站 2 万能通用版 3色彩自助站
......@@ -186,38 +137,8 @@
};
},
methods: {
//调转订单详情
toOrderDetail(item) {
this.sighstate = false;
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
//console.log("envVersionName="+envVersionName)
wx.navigateToMiniProgram({
appId: this.$Env.getappId(),
path: '/pages/mine/self_help_payment_details?orderId=' + item.order_id +
'&type=null&machine_id=' + item.machine_id,
extraData: {
foo: 'bar'
},
envVersion: envVersionName,
success(res) {
// 打开成功
},
fail(res) {
console.log("打开小程序失败")
}
});
},
self_help_payment(designer) {
if (designer.user_id != this.userId) {
return;
}
......@@ -225,7 +146,6 @@
machine_id: this.queryPage.machine_id,
s: 'machine.detail'
}).then(res => {
if (this.key == 2) {
this.designer = designer
if (designer.status.value == 1) {
this.clearIntervalTime()
......@@ -239,7 +159,6 @@
if (this.sighstate == true) return;
this.sighstate = true
}
}
}).catch(err => {
uni.showToast({
title: '设备休息中',
......@@ -259,7 +178,6 @@
});
},
loadGoodsList(direction) {
// uni.showLoading({ title: '加载中...' });
if (this.dataLoadState.pullDownRefresh || this.dataLoadState.reachBottom) return;
this.dataLoadState.pullDownRefresh = direction === Enums.DATA_DIRECTION.UP;
this.dataLoadState.reachBottom = direction === Enums.DATA_DIRECTION.DOWN;
......@@ -274,31 +192,14 @@
}
}
homeservice.queryList(this.queryPage).then(result => {
/*result.forEach((item, index) => {
// console.log(index)
let obj = index + 1
item.lineup = obj < 10 ? "0" + obj : obj
// console.log(item.lineup)
}) */
this.stateindex = true
// (index + 1).padStart(2,'0')
// 触底更新时,当前列表+查询结果集
// let newList = this.LoupanList.concat(result)
// this.LoupanList = newList
/* let LoupanNewList = [];
result.forEach((item, index) => {
if (this.userId == item.user_id) {
LoupanNewList.push(item)
}
}) */
//this.LoupanList = LoupanNewList
this.LoupanList = result
// 分页对象处理
//分页对象处理
this.queryPage.total = result.total;
this.queryPage.per_page = result.per_page;
// 停止当前页面下拉刷新
//停止当前页面下拉刷新
if (this.dataLoadState.pullDownRefresh) uni.stopPullDownRefresh();
// 数据加载状态处理 false
//数据加载状态处理 false
this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false;
// uni.hideLoading();
......
......@@ -19,7 +19,6 @@
mode="aspectFit" @click="previewImg(designer,0)"
style="width: 141upx; height:132upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
</view>
<view style="width: calc(100% - 141upx);">
<view style="width: 90%;font-size: 28upx;">
......
......@@ -24,14 +24,12 @@
:style="{transform: 'translateX(' + activebrushX + 'px) scale(' + transformscale + ')'}">
<view class='crate' :class="{crateactive:crateactivestate}" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'rotateX(-15deg) rotateY(' + coordinate.numberY +'deg)'}">
<view class='side top'>
<!-- 上 -->
<!-- <view class='side top'>
<image src="../../static/img/c.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<view class='side bottom' :style="{'-webkit-transform': 'translateY(' + (data.editorHeight - 20) + 'px) rotateX(90deg)',
</view> -->
<!-- <view class='side bottom' :style="{'-webkit-transform': 'translateY(' + (data.editorHeight - 20) + 'px) rotateX(90deg)',
transform: 'translateY(' + (data.editorHeight - 20) + 'px) rotateX(90deg)'}">
<!-- 下 -->
<image src="../../static/img/c.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
......@@ -43,31 +41,25 @@
transform: 'translateX(' + (data.editorWidth - 20) + 'px) rotateY(90deg)'}">
<image src="../../static/img/b.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<view class='side front'>
<!-- 前 -->
<image :src="background_surface_image + '?x-oss-process=image/resize,lfit,w_1500'" mode=""
style="position: absolute; width: 100%; height: 98%; left: 0; top: 0;"></image>
<!-- <view style="position: absolute; width: 100%; height: 98%; left: 0; top: 0; background: #fff;"></view> -->
<image :src="( good.icon ? good.icon : good.image )" mode="aspectFit"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
<image :src="good.goods.front_image " mode="aspectFit"
</view> -->
<view class='side front' style="background: #FFF;">
<view style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;background: #fff;"></view>
<image :src="( good.icon ? good.icon : good.image )" mode="aspectFit"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
<image :src="good.goods.front_image " mode="aspectFit"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<view class='side back'>
<!-- 后 -->
<!-- <view class='side back'>
<image src="../../static/img/a.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
</view> -->
</view>
<view style="margin-top: 50upx; text-align: center;" :style="{opacity:titlestate ? 1:0}">
<view style="font-size: 40upx; font-weight: bold;">
<text style="color: #FFFFFF;">{{good.goods.name || '**'}}</text>
</view>
<view style="margin-top: 25upx;">
<text style="color: #F56364;">
<text style="font-size: 46upx;" v-if="good">{{add}}</text>
</text>
<text style="color: #F56364;"><text style="font-size: 46upx;" v-if="good">{{add}}</text></text>
</view>
</view>
</view>
......@@ -97,17 +89,15 @@
add(arg1, arg2) {
if (this.good != null && this.coupon != null) {
if (this.coupon.discount_amount != undefined) {
return (Math.round(this.good.sales_price * 100) + Math.round(this.good.goods.sales_price * 100) -
Math.round(this.coupon.discount_amount * 100)) / 100;
return (Math.round(this.good.sales_price * 100) + Math.round(this.good.goods.sales_price * 100) - Math.round(this.coupon.discount_amount * 100)) / 100;
} else {
return (Math.round(this.good.sales_price * 100) + Math.round(this.good.goods.sales_price * 100)) /
100;
return (Math.round(this.good.sales_price * 100) + Math.round(this.good.goods.sales_price * 100)) / 100;
}
} else {
return ''
}
},
// 相乘
//相乘
multiple(arg1, arg2) {
return (Math.round(arg1 * 100) * Math.round(arg2 * 100)) / 10000;
},
......@@ -175,12 +165,12 @@
},
methods: {
dragStart(e) {
if (!this.coordinate.state) return; // 记录点击时的坐标值
/*if(!this.coordinate.state) return; // 记录点击时的坐标值
this.coordinate.startX = e.touches[0].clientX;
this.coordinate.startY = e.touches[0].clientY;
this.coordinate.startY = e.touches[0].clientY; */
},
dragMove(e) {
if (!this.coordinate.state) return;
/*if(!this.coordinate.state) return;
this.coordinate.touchMoveX = e.touches[0].clientX;
this.coordinate.touchMoveY = e.touches[0].clientY;
if (this.coordinate.touchMoveX > this.coordinate.startX) {
......@@ -189,21 +179,17 @@
this.coordinate.numberY -= this.coordinate.startX - this.coordinate.touchMoveX
}
this.coordinate.startX = e.touches[0].clientX;
this.coordinate.startY = e.touches[0].clientY;
this.coordinate.startY = e.touches[0].clientY; */
},
// 拖动结束事件
//拖动结束事件
dragEnd(e) {
if (!this.coordinate.state) return;
//if (!this.coordinate.state) return;
},
//创建订单
self_help() {
let data = {
s: 'Order.create',
type: this.key, //1:配送版,2:单机版,3:自助版
//type: 2, //1:配送版,2:单机版,3:自助版
//type:3, //新增字段
machine_id: this.machine_id, //设备
goods_id: this.goods_id, //产品
works_id: this.works_id, //作品
......@@ -216,7 +202,6 @@
coupon_id: null, //优惠券id,支付多个id( 1-2-3)
user_address: null, //地址
support_pay: this.machine_item.support_pay,
surface_type: this.$base.surfaceData.surface_type, //材质类型 0:默认 1:自带壳 2:定制壳
surface_id: this.$base.surfaceData.surface_id, //材质对应的编号,没有的话就为0或者不传
surface_color_series_id: this.$base.surfaceData.surface_color_series_id, //选择的色系编号,没有的话就不传或者为0
......@@ -251,7 +236,6 @@
signType: 'MD5',
paySign: params.sign,
success: (res) => {
//console.log('success:' + JSON.stringify(res));
uni.showToast({
title: '支付成功',
duration: 3000,
......@@ -284,7 +268,7 @@
// this.activebrushX = ((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth)
// setTimeout(function(){
// uni.navigateTo({ url: './self_help_payment_details?orderId=161819487100005361&type=null&machine_id=100012' })
// }.bind(this), 3000)
// }.bind(this), 3000)
// }
let _this = this
if ((this.orderIdone != null && this.tabletext) || (this.orderIdtwo != null && !this.tabletext)) {
......@@ -359,11 +343,14 @@
}
this.loading = true; //防止多次点击支付
let seft = this
//console.log("打印22")
uni.showLoading({
title: '正在提交中...'
})
homeservice.WorksList(data).then(result => {
console.log('result', result)
//console.log('result', result)
if (this.tabletext) {
this.resultpayone = result
this.orderIdone = result.order_id
......@@ -450,7 +437,7 @@
});
});
},
// 设备进来的
//设备进来的
machine_pageslist(e) {
this.machine_pages = false
this.machine_item = this.machineDetail
......@@ -479,7 +466,7 @@
// uni.showToast({title: err.msg,icon: 'none'})
// });
},
Worksdetail() { // 获取作品详情
Worksdetail() { //获取作品详情
homeservice.WorksList({
s: 'Works.detail',
id: this.works_id,
......@@ -489,43 +476,27 @@
this.good = result
this.data.editorWidth = result.goods.design_width * this.data.pixelRate // 设计宽度
this.data.editorHeight = result.goods.design_height * this.data.pixelRate // 设计高度
this.data.render_cove_width = result.goods.render_cove_width * (result.goods.design_width /
result.goods.render_width) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height /
result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods
.render_width) * this.data.pixelRate // 设计高度
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods
.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth)
this.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth)
this.data.render_cove_width = result.goods.render_cove_width * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate // 设计高度
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
this.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
this.$base.mobilePhoneCaseSize = this.data
//背景图移动 1.5s
setTimeout(function() {
this.translateX = -this.data.windowWidth
}.bind(this), 1000)
// 手机壳进去页面 1.5s
//手机壳进去页面 1.5s
setTimeout(function() {
this.activebrushX = 0
}.bind(this), 2500)
// 震动 1s
}.bind(this), 2000)
this.coordinate.state = true
//this.titlestate = true
setTimeout(function() {
this.isReady = true;
wx.vibrateLong()
this.titlestate = true
}.bind(this), 4000)
// 开始自转 1s
setTimeout(function() {
this.crateactivestate = true
}.bind(this), 4500)
// 开启手动旋转 10s
setTimeout(function() {
this.coordinate.state = true
}.bind(this), 14500)
}.bind(this), 3500)
uni.stopPullDownRefresh();
}).catch(err => {
uni.showToast({
......@@ -535,9 +506,9 @@
});
},
},
// 下拉加载
//下拉加载
onPullDownRefresh() {},
// 上拉加载
//上拉加载
onReachBottom() {},
onLoad(options) {
var that = this;
......@@ -550,8 +521,6 @@
that.data.pixelRate = pixelRate // 屏幕宽度比率
}
})
//console.log(options)
// machine_id=100013&goods_id=37&goodid=9843
if (options.sn) {
this.sn = options.sn
}
......@@ -571,17 +540,14 @@
}
if (options.machine_id != 'null') { //设备进来的
this.machine_id = options.machine_id
//this.machine_pageslist() // 默认有设备进来的
}
if (options.customize_size_id) { //设备进来的
this.customize_size_id = options.customize_size_id
}
if (options.machineDetail != 'null') { //设备进来的
this.machineDetail = JSON.parse(decodeURIComponent(options.machineDetail));
this.machine_pageslist() // 默认有设备进来的
}
if (options.goodid != 'null') {
this.works_id = options.goodid
this.Worksdetail() // 获取作品
......@@ -597,18 +563,16 @@
background: #131319 !important;
}
// 3D动画
//3D动画
.crate-wrapper {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
// background-color: #232323;
//background-color: #232323;
}
.crate {
// width: 200px;
// height: 370px;
position: relative;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
......@@ -618,9 +582,7 @@
.crateactive {
-webkit-animation: crate-spin 10s linear 1;
/* linear 动画从头到尾的速度是相同的。 */
animation: crate-spin 10s linear 1;
/* infinite 规定动画应该无限次播放。 */
}
.brush {
......@@ -634,11 +596,9 @@
position: absolute;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
/* background-color: #d07f2c; */
/* outline: 1px solid #a66523; */
}
/**/
/**/
.crate .side.top {
width: 100%;
height: 40px;
......@@ -650,8 +610,6 @@
.crate .side.bottom {
width: 100%;
height: 40px;
// -webkit-transform: translateY(calc(720px/2)) rotateX(90deg);
// transform: translateY(calc(720px/2)) rotateX(90deg);
}
//
......
......@@ -4,369 +4,430 @@
<!-- https://img.colorpark.cn/wechat/stitch.m4a -->
<!-- https://img.colorpark.cn/wechat/ring.m4a -->
<!-- https://img.colorpark.cn/wechat/ring2.m4a -->
<audio src="https://img.colorpark.cn/wechat/stitch.m4a"
:action="stitchaction" controls loop style="opacity: 0; position: absolute;"></audio>
<audio src="https://img.colorpark.cn/wechat/ring2.m4a"
:action="ringaction" controls loop style="opacity: 0; position: absolute;"></audio>
<audio src="https://img.colorpark.cn/wechat/stitch.m4a" :action="stitchaction" controls loop
style="opacity: 0; position: absolute;"></audio>
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
style="opacity: 0; position: absolute;"></audio>
<!-- 礼花 -->
<firework ref="firework" v-if="isReady" style="position: fixed;z-index: 9999;"></firework>
<!-- 继续定制 -->
<view @click="tomall" style="position: fixed; right: 0; bottom: 100upx; display: flex;align-items: center;justify-content: center; width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx; z-index: 999;">
<view @click="tomall"
style="position: fixed; right: 0; bottom: 100upx; display: flex;align-items: center;justify-content: center; width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx; z-index: 999;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>继续</view><view>定制</view>
<view>继续</view>
<view>定制</view>
</view>
</view>
<view style="height:100%;width: 100%; overflow: hidden;">
<!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "-->
<view :animation="BoxTwoAnimation"
style="width: 100%; height: 100%;"
<view :animation="BoxTwoAnimation" style="width: 100%; height: 100%;"
v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) < 2 && type != 1 && LoadState">
<!-- 排队中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 0" style="position: absolute; top: 0; right: 200%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
<!-- 排队中 -->
<view v-if="orderOrderStatusData.status == 0" style="position: absolute; width: 100%; height: 100%; overflow: hidden; right: 100%;">
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/paiduiqu_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; height: 100%;overflow: hidden;">
<view class='crate-wrapper'>
<view style="display: flex;position: relative;">
<view style="position: relative;transition: all 3s; z-index: 2;"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
<!-- 排队中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 0"
style="position: absolute; top: 0; right: 200%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<!-- 排队中 -->
<view v-if="orderOrderStatusData.status == 0"
style="position: absolute; width: 100%; height: 100%; overflow: hidden; right: 100%;">
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/paiduiqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; height: 100%;overflow: hidden;">
<view class='crate-wrapper'>
<view style="display: flex;position: relative;">
<view style="position: relative;transition: all 3s; z-index: 2;" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.activebrushX + 'px)'}">
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></image>
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto;z-index: 3; overflow: hidden;"></image>
</view>
<image v-for="(item,index) in rankinglist" :key="index" v-if="index < 3"
style="transition: all 1s;"
:style="{height: data.editorHeight +'px',width:item.w +'px',
transform: 'translateX(' + item.x + 'px)'}"
src="../../static/img/d.png" mode=""></image>
<!-- 刷子 -->
<!-- <view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;">
</image>
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto;z-index: 3; overflow: hidden;">
</image>
</view>
<image v-for="(item,index) in rankinglist" :key="index" v-if="index < 3"
style="transition: all 1s;" :style="{height: data.editorHeight +'px',width:item.w +'px',
transform: 'translateX(' + item.x + 'px)'}" src="../../static/img/d.png" mode=""></image>
<!-- 刷子 -->
<!-- <view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;">
<view :style="{width: leftx +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0;background: #fff;">
</view>
</view> -->
</view>
</view>
</view>
</view>
<!-- 打印中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 1" style="position: absolute; top: 0; right: 100%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
<!-- 生产中打印 1-->
<view style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;">
<!-- 背景图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/dayinqu_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
</view>
<!-- 打印中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 1"
style="position: absolute; top: 0; right: 100%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<!-- 生产中打印 1-->
<view
style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;">
<!-- 背景图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/dayinqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative;width: 100%; height: 100%;overflow: hidden;" :animation="printingEnd">
<view class='crate-wrapper'>
<view class="brush"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
</view>
<view style="position: relative;width: 100%; height: 100%;overflow: hidden;"
:animation="printingEnd">
<view class='crate-wrapper'>
<view class="brush" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.printingStartX + 'px)'}">
<view :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
<view :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
style="position: relative;overflow: hidden;">
<!-- 底图 -->
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0;
margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<!-- 作品图 -->
<image v-if="initstate" :src="goods.works_image" mode=""
<!-- 底图 -->
<view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0;
margin: auto; bottom: 0; background: #fff; z-index: 1;"></view>
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
<!-- 作品图 -->
<image v-if="initstate" :src="goods.works_image" mode=""
:style="{'z-index': data.render_cove_width ? 2:0}"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0;"></image>
<!-- 刷子 -->
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;">
<view :style="{width: leftx +'px',height: data.render_cove_height +'px',background: goods.goods.design_color}"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0;">
</image>
<!-- 刷子 -->
<view
:style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;">
<view
:style="{width: leftx +'px',height: data.render_cove_height +'px',background: goods.goods.design_color}"
style="position: absolute; left: 0; top: 0;">
</view>
</view>
<!-- 手机壳 -->
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image>
</view>
<!-- 刷子范围 -->
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 5;">
<view class="item-text" :animation="animMaind" :class="{printer:printer}"
:style="{left: leftx +'px',opacity: printer ? 1 : 0}"
<!-- 手机壳 -->
<image :src="goods.goods.front_image" mode="" style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image>
</view>
<!-- 刷子范围 -->
<view
:style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 5;">
<view class="item-text" :animation="animMaind" :class="{printer:printer}"
:style="{left: leftx +'px',opacity: printer ? 1 : 0}"
style="width:40px; height:100px; position:absolute; top: -50px;">
<image src="../../static/img/shua.png" mode="" style="width:40px; height:100px;"></image>
</view>
<image src="../../static/img/shua.png" mode=""
style="width:40px; height:100px;"></image>
</view>
</view>
</view>
</view>
</view>
<!-- 取货状态 10,2-->
<view style="position: relative; width: 100%; height: 100%; overflow: hidden;">
<!-- 底图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
</view>
<!-- 取货状态 10,2-->
<view style="position: relative; width: 100%; height: 100%; overflow: hidden;">
<!-- 底图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view class='crate-wrapper'>
<view class="twobrush" :animation="PickUpStart"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
</view>
<view class='crate-wrapper'>
<view class="twobrush" :animation="PickUpStart" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateY(' + -(data.editorHeight + (data.windowHeight - data.editorHeight)/2) + 'px)'}">
<!-- 底图 -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode=""
style="position: absolute; width: 100%;
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<!-- 底图 -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode="" style="position: absolute; width: 100%;
height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></image>
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
<image :src="goods.goods.front_image" mode="" style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image>
</view>
</view>
</view>
</view>
<!-- 暂时缺货、订单已取消 -->
<view style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
</view>
<!-- 暂时缺货、订单已取消 -->
<view
style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
v-if="(orderOrderStatusData.status == 3 || orderOrderStatusData.status == -3) && type != 1">
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/icon_close.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
暂时缺货、订单已取消
</view>
<view style="margin-top: 378upx; display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;" @click="previewImg(goods,0)">
<view style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;"></view>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"></image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;" v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view v-if="type != 2" style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view>
</view>
</view>
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/icon_close.png" mode="aspectFill"></image>
</view>
</view>
<!-- 设备故障状态 -->
<view style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
v-if="orderOrderStatusData.status == -2 && type != 1">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
<image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image>
<view class="start_text">{{msg || ''}}</view>
<view>
<view class="start_text">联系客服</view>
<view class="start_text" style="display: flex; justify-content: center; align-items: center;">
<image src="../../static/phone.png" mode="" style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
{{phone || '18938664545'}}
</view>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
暂时缺货、订单已取消
</view>
<image src="../../static/logo.jpg" mode="aspectFill" style="width: 664upx; height: 757upx; opacity: 0.03; position: absolute; left: 0; bottom: 0; z-index: -1;"></image>
</view>
<!-- 取货完成状态 -->
<view v-if="orderOrderStatusData.status == 7 && type != 1">
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
打印完成
</view>
<view style="height: 378upx; text-align: center;">
<text v-if="type == 2" style="font-size: 36upx; line-height: 378upx;font-weight: bold;">
{{goods.order_queue.id || ''}}
</text>
</view>
<view style="display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;" @click="previewImg(goods,0)">
<view style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;"></view>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"></image>
<view style="margin-top: 378upx; display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;"
@click="previewImg(goods,0)">
<view
style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view
style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
</view>
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;"v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</view>
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;" v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}}
</text>
</view>
<view v-if="type != 2" style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view>
</text>
</view>
<view v-if="type != 2"
style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view>
</view>
</view>
</view>
<!-- -----------快递发货----------- -->
<!-- 生产中 -->
<view style="position: relative;" v-if="goods.status.value <= 8 && type == 1">
<view style="width: 300upx; min-height: 300upx; margin:90upx auto 66upx; position: relative;
border-radius: 10upx;" :style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view style="width: 206upx; height: 224upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image style="width: 206upx; height: 224upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 206upx; height: 224upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
</view>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
<text v-if="goods.is_pay.value == 0">支付失败</text>
<text v-if="goods.is_pay.value == 1">
<!-- <text v-if="goods.status.value == 0">等待生产</text> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">生产中</text>
<text v-if="goods.status.value == 8">已发货</text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #CCCCCC; margin-top: 20upx; text-align: center;">
<text v-if="goods.is_pay.value == 0">作品支付失败</text>
<text v-if="goods.is_pay.value == 1">
<!-- <text v-if="goods.status.value == 0">作品正在等待生产</text> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">色彩正在加急冲印,请留意最新的状态通知</text>
</text>
<text v-if="goods.status.value == 8">色彩正在配送路上,请留意最新的配送状态</text>
<view v-if="goods.status.value == 8">{{goods.order_express.express_name || ''}}</view>
<view v-if="goods.status.value == 8">快递单号: {{goods.order_express.express_no || ''}}</view>
</view>
<view style="margin-top: 104upx; margin-left: 20%; width: 60%;">
<view style=" font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text> <text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 10upx;">
<text > 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 支付金额: </text> <text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 下单时间: </text> <text style="color: #888888;"> {{goods.create_time || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}} {{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
<!-- 设备故障状态 -->
<view
style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
v-if="orderOrderStatusData.status == -2 && type != 1">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
<image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image>
<view class="start_text">{{msg || ''}}</view>
<view>
<view class="start_text">联系客服</view>
<view class="start_text" style="display: flex; justify-content: center; align-items: center;">
<image src="../../static/phone.png" mode=""
style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
{{phone || '18938664545'}}
</view>
</view>
</view>
<!-- 收货成功 -->
<view v-if="goods.status.value == 9 && type == 1">
<image src="../../static/logo.jpg" mode="aspectFill"
style="width: 664upx; height: 757upx; opacity: 0.03; position: absolute; left: 0; bottom: 0; z-index: -1;">
</image>
</view>
<!-- 取货完成状态 -->
<view v-if="orderOrderStatusData.status == 7 && type != 1">
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
收货成功
打印完成
</view>
<view style="margin-top: 104upx; margin-left: 25%; width: 50%;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递公司: </text> <text style="color: #888888;"> {{goods.order_express.express_name || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递单号: </text> <text style="color: #888888;"> {{goods.order_express.express_no || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}} {{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
<view style="height: 378upx; text-align: center;">
<text v-if="type == 2" style="font-size: 36upx; line-height: 378upx;font-weight: bold;">
{{goods.order_queue.id || ''}}
</text>
</view>
<view style="margin-top: 104upx; display: flex; align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;"
:style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view style="width: 128upx; height: 141upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image style="width: 128upx; height: 141upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 128upx; height: 141upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
<view style="display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;"
@click="previewImg(goods,0)">
<view
style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view
style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx;">
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;">
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;" v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}}
</text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<view v-if="type != 2"
style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount || ''}} </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time || ''}} </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view>
</view>
</view>
</view>
</view>
<!-- -----------快递发货----------- -->
<!-- 生产中 -->
<view style="position: relative;" v-if="goods.status.value <= 8 && type == 1">
<view style="width: 300upx; min-height: 300upx; margin:90upx auto 66upx; position: relative;
border-radius: 10upx;" :style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view
style="width: 206upx; height: 224upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image
style="width: 206upx; height: 224upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image
style="width: 206upx; height: 224upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
</view>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
<text v-if="goods.is_pay.value == 0">支付失败</text>
<text v-if="goods.is_pay.value == 1">
<!-- <text v-if="goods.status.value == 0">等待生产</text> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">生产中</text>
<text v-if="goods.status.value == 8">已发货</text>
</text>
</view>
<view
style="font-size: 24upx; font-weight: 400; color: #CCCCCC; margin-top: 20upx; text-align: center;">
<text v-if="goods.is_pay.value == 0">作品支付失败</text>
<text v-if="goods.is_pay.value == 1">
<!-- <text v-if="goods.status.value == 0">作品正在等待生产</text> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">色彩正在加急冲印,请留意最新的状态通知</text>
</text>
<text v-if="goods.status.value == 8">色彩正在配送路上,请留意最新的配送状态</text>
<view v-if="goods.status.value == 8">{{goods.order_express.express_name || ''}}</view>
<view v-if="goods.status.value == 8">快递单号: {{goods.order_express.express_no || ''}}</view>
</view>
<view style="margin-top: 104upx; margin-left: 20%; width: 60%;">
<view style=" font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text> <text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 10upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 支付金额: </text> <text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 下单时间: </text> <text style="color: #888888;"> {{goods.create_time || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}}
{{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
</view>
</view>
<!-- 收货成功 -->
<view v-if="goods.status.value == 9 && type == 1">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
收货成功
</view>
<view style="margin-top: 104upx; margin-left: 25%; width: 50%;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递公司: </text> <text style="color: #888888;"> {{goods.order_express.express_name || ''}}
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递单号: </text> <text style="color: #888888;"> {{goods.order_express.express_no || ''}}
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}}
{{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
</view>
<view style="margin-top: 104upx; display: flex; align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;"
:style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view
style="width: 128upx; height: 141upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image
style="width: 128upx; height: 141upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image
style="width: 128upx; height: 141upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix">
</image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time || ''}} </text>
</view>
</view>
</view>
</view>
</view>
<view v-if="rankinglist.length > 0 && type != 2" style="position: fixed; bottom: 30upx;
margin: auto; left: 0; right: 0;
......@@ -378,9 +439,11 @@
<script>
import homeservice from '@/service/homeservice.js'
import firework from '@/components/ay-firework/firework.vue';//礼花
import firework from '@/components/ay-firework/firework.vue'; //礼花
export default {
components: {firework},
components: {
firework
},
computed: {},
data() {
return {
......@@ -389,173 +452,182 @@
s: 'Order.detail',
id: null
},
machine_id:null,//设备id
type:null ,//1:配送版,2:单机版,3:自助版
lineUpState: false,//排队状态----横向进入滑动动画
leaveUpState: false,//排队状态----横向离开滑动动画
printingStart: false,//打印状态----横向进来滑动动画 Printing start
printingEnd:{}, ///打印状态----纵向离开动画 Printing end
initstate: false,//打印状态----显示刷子
PickUpStart:{}, //取货状态-----手机壳从上面动画出来
PickUpTopBottom:null, //定时器----取货上下浮动
statetime:null,//定时器----打印机动画
orderOrderStatusTime:null,//定时器---查询订单状态
OrderOrderRankingTime:null,//定时器---排队定时器
leftx:0,//x轴-----刷子打印
topy:-20,//y-----刷子打印
animMaind:{}, //动画----刷子上下动画
animMaind_time:800, //动画时间----刷子上下动画时间
isReady: false,//礼花开关
BoxTwoAnimation:{}, //排队-打印-取货流程图架构
oldRankinglist:[],//上次排队队列
rankinglist:[],//排队队列
teststate:false,//开启测试模式 false true
orderOrderStatusData:null,//订单状态
machine_id: null, //设备id
type: null, //1:配送版,2:单机版,3:自助版
lineUpState: false, //排队状态----横向进入滑动动画
leaveUpState: false, //排队状态----横向离开滑动动画
printingStart: false, //打印状态----横向进来滑动动画 Printing start
printingEnd: {}, ///打印状态----纵向离开动画 Printing end
initstate: false, //打印状态----显示刷子
PickUpStart: {}, //取货状态-----手机壳从上面动画出来
PickUpTopBottom: null, //定时器----取货上下浮动
statetime: null, //定时器----打印机动画
orderOrderStatusTime: null, //定时器---查询订单状态
OrderOrderRankingTime: null, //定时器---排队定时器
leftx: 0, //x轴-----刷子打印
topy: -20, //y-----刷子打印
animMaind: {}, //动画----刷子上下动画
animMaind_time: 800, //动画时间----刷子上下动画时间
isReady: false, //礼花开关
BoxTwoAnimation: {}, //排队-打印-取货流程图架构
oldRankinglist: [], //上次排队队列
rankinglist: [], //排队队列
teststate: false, //开启测试模式 false true
orderOrderStatusData: null, //订单状态
ringaction: { //打印机音乐状态
method: 'pause' //method: 'pause'method: 'play'
},
stitchaction: { //履带音乐状态
method: 'pause' //method: 'pause'method: 'play'
},
printer:false,//打印机状态
printer: false, //打印机状态
data: {
windowWidth: 0, // 屏幕宽度
windowHeight: 0, // 屏幕高度
pixelRate: 0, // 屏幕宽度比率
editorWidth: 0, // 设计宽度
editorHeight: 0, // 设计高度
render_cove_width:null,
render_cove_height:null,
activebrushX:-500,//排队盒子动画坐标
printingStartX:-500,//生产中盒子动画坐标
render_cove_width: null,
render_cove_height: null,
activebrushX: -500, //排队盒子动画坐标
printingStartX: -500, //生产中盒子动画坐标
},
tomallstate:true,//防止返回触动页面销毁事件
LoadState:false,//加载完成
orderCurrentOrder:null,
orderCurrentOrderTime:null,
background_surface_image:null,//定制壳手机壳底色
tomallstate: true, //防止返回触动页面销毁事件
LoadState: false, //加载完成
orderCurrentOrder: null,
orderCurrentOrderTime: null,
background_surface_image: null, //定制壳手机壳底色
};
},
onReady() {
},
methods: {
tomall(){
tomall() {
this.tomallstate = false
wx.navigateBack({delta: 3})
wx.navigateBack({
delta: 3
})
},
init() {
this.printer = true
this.isReady = false
this.leftx = this.data.render_cove_width
// this.topy = -20
setTimeout(function(){
setTimeout(function() {
this.updata()
}.bind(this),2000)
}.bind(this), 2000)
},
updata(){
setTimeout(function(){
updata() {
setTimeout(function() {
this.ringaction.method = 'play' //开启音乐
console.log('5开启音乐')
}.bind(this),this.animMaind_time)
}.bind(this), this.animMaind_time)
// 无限循环动画
var animation = wx.createAnimation({
duration: this.animMaind_time,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: this.animMaind_time, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
var state = true // 控制上下滑动setTimeout setInterval
this.statetime = setInterval(function(){
if(state == true){
animation.translate(0,(this.data.render_cove_height)).step();//向下移动
}else{
animation.translate(0,0).step();//向上移动
this.statetime = setInterval(function() {
if (state == true) {
animation.translate(0, (this.data.render_cove_height)).step(); //向下移动
} else {
animation.translate(0, 0).step(); //向上移动
}
state = !state
// 减慢打印时间
if(this.leftx <= 10){
if(this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2){
if (this.leftx <= 10) {
if (this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2) {
this.leftx -= 2
}else{
} else {
this.leftx -= 0.1
}
}else{
} else {
this.leftx -= 1
}
this.setData({
animMaind: animation.export(),
leftx:this.leftx
animMaind: animation.export(),
leftx: this.leftx
})
// 打印完成----清除定时器
if(this.leftx <= 0){
if (this.leftx <= 0) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
clearInterval(this.statetime)
this.statetime = null
this.isReady = true;
this.printer = false
uni.showToast({title: '打印完成,即将出货',icon: 'none',duration: 2000});
setTimeout(function(){
uni.showToast({
title: '打印完成,即将出货',
icon: 'none',
duration: 2000
});
setTimeout(function() {
this.boxinit({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:this.data.windowHeight,// y轴移动
settimeout:3500,// 定时器时间
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: this.data.windowHeight, // y轴移动
settimeout: 3500, // 定时器时间
}) // 触发打印完成--手机壳下移消失
}.bind(this),2000)
}.bind(this), 2000)
}
}.bind(this),this.animMaind_time)
}.bind(this), this.animMaind_time)
},
// 打印完成--手机壳下移消失
boxinit(data){
boxinit(data) {
var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
printingEnd: animation.export(),
})
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:2000,// 动画执行时间
axisX:0,// x轴移动
axisY:-this.data.windowHeight,// y轴移动
settimeout:2500,// 定时器时间
settimeoutState:true,//开启下一步
duration: 2000, // 动画执行时间
axisX: 0, // x轴移动
axisY: -this.data.windowHeight, // y轴移动
settimeout: 2500, // 定时器时间
settimeoutState: true, //开启下一步
})
}.bind(this),data.settimeout)
}.bind(this), data.settimeout)
},
// 取货页面----底部向上滑动动画
Box_Two_Animation(data){
Box_Two_Animation(data) {
var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
BoxTwoAnimation: animation.export(),
})
if(!data.settimeoutState) return;
wx.setNavigationBarTitle({title: '取货区' })
setTimeout(function(){
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight)/2)) - ( this.data.editorHeight / 3 * 1)
if (!data.settimeoutState) return;
wx.setNavigationBarTitle({
title: '取货区'
})
setTimeout(function() {
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight) /
2)) - (this.data.editorHeight / 3 * 1)
this.Two_Brush_Animation({
duration:5000,// 动画执行时间
axisX:0,// x轴移动
axisY:boxinitY,// y轴移动
settimeout:5000,// 定时器时间
duration: 5000, // 动画执行时间
axisX: 0, // x轴移动
axisY: boxinitY, // y轴移动
settimeout: 5000, // 定时器时间
})
}.bind(this),data.settimeout)
}.bind(this), data.settimeout)
},
// 取货手机壳动画
Two_Brush_Animation(data){
Two_Brush_Animation(data) {
let animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
......@@ -564,56 +636,66 @@
// 上下浮动
clearInterval(this.PickUpTopBottom)
this.PickUpTopBottom = null
setTimeout(function(){
uni.showToast({title: '已出货,请在出货口取货吧',icon: 'none',duration: 2000});
setTimeout(function() {
uni.showToast({
title: '已出货,请在出货口取货吧',
icon: 'none',
duration: 2000
});
var state = true
let animation = wx.createAnimation({
duration: 2000,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: 2000, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
this.PickUpTopBottom = setInterval(function(){
if(state == true){
animation.translate(data.axisX,(data.axisY + 40)).step();
}else{
animation.translate(data.axisX,data.axisY).step();
this.PickUpTopBottom = setInterval(function() {
if (state == true) {
animation.translate(data.axisX, (data.axisY + 40)).step();
} else {
animation.translate(data.axisX, data.axisY).step();
}
state = !state
this.setData({
PickUpStart: animation.export(),
PickUpStart: animation.export(),
})
}.bind(this),2000)
}.bind(this),data.settimeout)
}.bind(this), 2000)
}.bind(this), data.settimeout)
},
loadData() {
uni.showLoading({title: '正在加载中...'})
uni.showLoading({
title: '正在加载中...'
})
homeservice.WorksList(this.queryPage).then(result => {
this.goods = result
if(this.$base.mobilePhoneCaseSize){
//this.goods.status = 8
/*if(this.$base.mobilePhoneCaseSize) {
this.data = this.$base.mobilePhoneCaseSize
}else{
} else { */
this.background_surface_image = result.goods.surface_pic
result.goods.design_width = 200 / this.data.pixelRate
result.goods.design_height = 370 / this.data.pixelRate
result.goods.render_cove_width = 270 / this.data.pixelRate
result.goods.render_cove_height = 640 / this.data.pixelRate
this.data.editorWidth = result.goods.design_width * this.data.pixelRate // 设计宽度
this.data.editorHeight = result.goods.design_height * this.data.pixelRate // 设计高度
this.data.render_cove_width = result.goods.render_cove_width * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_width = this.data.editorWidth - 40 // 设计高度
this.data.render_cove_height = this.data.editorHeight - 40 // 设计高度
this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate // 设计高度
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50)
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth + 50)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth + 50)
this.$base.mobilePhoneCaseSize = this.data
}
//}
//console.log(this.$base.mobilePhoneCaseSize)
this.leftx = this.data.render_cove_width
// status.value 订单状态 0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成 -->
// type.value 1直营配送站 2 万能通用版 3色彩自助站
if(this.teststate){
if (this.teststate) {
result.status.value = 1 //1:生产中
result.type.value = 2 //2单机版
}
this.type = result.type.value
// 单机版查询当前设备打印订单
if(this.type == 2){
if (this.type == 2) {
this.anb() //查询排队列表
// clearInterval(this.orderCurrentOrderTime)
// this.orderCurrentOrderTime = setInterval(function(){
......@@ -625,66 +707,76 @@
// // this.anbtwo() //记录排队人数
// }.bind(this),10000)
this.leaveto(3)
}else{
} else {
this.OrderOrderStatusInit()
}
uni.hideLoading();
uni.stopPullDownRefresh();
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
anb(){
anb() {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
this.orderOrderStatusData = result
this.orderOrderStatusData.status = 0
// wx.setNavigationBarTitle({title: '排队区' })
// this.anbone()
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
anbone(){
anbone() {
homeservice.WorksList({
s:'Order.orderRanking',
order_id:this.queryPage.id,
machine_id:this.machine_id
s: 'Order.orderRanking',
order_id: this.queryPage.id,
machine_id: this.machine_id
}).then(result => {
this.oldRankinglist = []// 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){
this.oldRankinglist = [] // 第一次进来记录排队人数
for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({
w:30,x:0
w: 30,
x: 0
})
}
this.rankinglist = this.oldRankinglist
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){
setTimeout(function() {
this.lineUpState = true
this.data.activebrushX = 0
}.bind(this),4500)
}.bind(this), 4500)
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// anbtwo(){
......@@ -704,14 +796,14 @@
// uni.showToast({title: err.msg || err.data,icon: 'none'});
// });
// },
OrdercurrentOrder(){
OrdercurrentOrder() {
console.log('单机版查询设备打印订单')
homeservice.WorksList({
s:'Order.currentOrder',
machine_id:this.machine_id
s: 'Order.currentOrder',
machine_id: this.machine_id
}).then(result => {
this.orderCurrentOrder = result.order_id
if(this.teststate){
if (this.teststate) {
this.orderCurrentOrder = this.queryPage.id // 测试
}
// if(this.orderCurrentOrder == this.queryPage.id){
......@@ -724,23 +816,30 @@
// this.leaveto(3)
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
OrderOrderStatusInit(e){
OrderOrderStatusInit(e) {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
//result.status -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
if(this.teststate || e == 2){
if (this.teststate || e == 2) {
result.status = 0 // 测试
}
this.orderOrderStatusData = result
if(result.status == 0){ //0:待打印排队中
wx.setNavigationBarTitle({title: '排队区' })
//this.orderOrderStatusData.status = 1
//this.orderOrderStatusData = 1
if (result.status == 0) { //0:待打印排队中
wx.setNavigationBarTitle({
title: '排队区'
})
this.OrderOrderRankingInit(4)
if(this.teststate){
if (this.teststate) {
// setTimeout(function(){
// this.OrderOrderRankingInit(1)
// }.bind(this),5000)
......@@ -748,89 +847,102 @@
// this.OrderOrderRankingInit(-1)
// }.bind(this),10000)
}
if(this.type != 2){
if(!this.teststate && e != 2){// 排队定时器 测试需要关闭
if (this.type != 2) {
if (!this.teststate && e != 2) { // 排队定时器 测试需要关闭
clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = setInterval(function(){
this.OrderOrderRankingTime = setInterval(function() {
this.OrderOrderRankingInit()
}.bind(this),10000)
}.bind(this), 10000)
}
}
}else if(result.status == 1){// 1:打印中
wx.setNavigationBarTitle({title: '打印区' })
} else if (result.status == 1) { // 1:打印中
wx.setNavigationBarTitle({
title: '打印区'
})
// 打开排队页面
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
// 打印状态滑动进来
setTimeout(function(){
setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画 3s
this.data.printingStartX = 0
}.bind(this),4500)
setTimeout(function(){
this.initstate = true //打印状态----显示刷子
}.bind(this), 4500)
setTimeout(function() {
this.initstate = true //打印状态----显示刷子
this.init()
}.bind(this),7500)
if(!this.teststate){
}.bind(this), 7500)
if (!this.teststate) {
// 定时器查询订单状态
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),10000)
}else{
}.bind(this), 10000)
} else {
// 定时器查询订单状态
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),30000)
}.bind(this), 30000)
}
}else if(result.status == 2 || result.status == 10){ //2:生产完成 10:打印完成
} else if (result.status == 2 || result.status == 10) { //2:生产完成 10:打印完成
this.LoadState = true
wx.setNavigationBarTitle({title: '取货区' })
wx.setNavigationBarTitle({
title: '取货区'
})
this.Box_Two_Animation({
duration:2000,// 动画执行时间
axisX:0,// x轴移动
axisY:-this.data.windowHeight,// y轴移动
settimeout:2500,// 定时器时间
settimeoutState:true,//开启下一步
duration: 2000, // 动画执行时间
axisX: 0, // x轴移动
axisY: -this.data.windowHeight, // y轴移动
settimeout: 2500, // 定时器时间
settimeoutState: true, //开启下一步
})
} else if (result.status == 3 || result.status == -3) {
wx.setNavigationBarTitle({
title: '取消生产'
})
} else if (result.status == -2) {
wx.setNavigationBarTitle({
title: '设备故障'
})
} else if (result.status == 7) {
wx.setNavigationBarTitle({
title: '取货完成'
})
}else if(result.status == 3 || result.status == -3){
wx.setNavigationBarTitle({title: '取消生产' })
}else if(result.status == -2){
wx.setNavigationBarTitle({title: '设备故障' })
}else if(result.status == 7){
wx.setNavigationBarTitle({title: '取货完成' })
}
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
// 打印状态滑动进来
orderOrderStatusGet(){
orderOrderStatusGet() {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
if(this.teststate){
if (this.teststate) {
result.status = 2
}
this.orderOrderStatusData = result
if(result.status == 10 || result.status == 2){
if (result.status == 10 || result.status == 2) {
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -841,26 +953,32 @@
animMaind_time: animMaind_time || 200,
})
this.updata()
}else if(result.status == 3 || result.status == -3){
} else if (result.status == 3 || result.status == -3) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '取消生产' })
wx.setNavigationBarTitle({
title: '取消生产'
})
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null
}else if(result.status == -2){
} else if (result.status == -2) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '设备故障' })
wx.setNavigationBarTitle({
title: '设备故障'
})
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null
}else if(result.status == 7){
} else if (result.status == 7) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '取货完成' })
wx.setNavigationBarTitle({
title: '取货完成'
})
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -868,166 +986,180 @@
}
}).catch(err => {
console.log(err)
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// 查询排队
// 如果订单不存单,或者订单已经打印完成,那么返回的排名是-1
// 如果订单当前正在打印。返回的排名是0
// 如果前面有一个订单就返回1,前面有两个订单就返回2
OrderOrderRankingInit(state){
OrderOrderRankingInit(state) {
homeservice.WorksList({
s:'Order.orderRanking',
order_id:this.queryPage.id,
machine_id:this.machine_id
s: 'Order.orderRanking',
order_id: this.queryPage.id,
machine_id: this.machine_id
}).then(result => {
if(this.teststate){
if (this.teststate) {
result.ranking = state //例子
}
if(result.ranking >= 0){
if(this.oldRankinglist.length > 0){
if(this.rankinglist.length > result.ranking){
if (result.ranking >= 0) {
if (this.oldRankinglist.length > 0) {
if (this.rankinglist.length > result.ranking) {
// 排队消失列表效果
this.rankinglist[(this.rankinglist.length - 1)].x = 200
setTimeout(function(){
setTimeout(function() {
this.rankinglist[(this.rankinglist.length - 1)].w = 0
}.bind(this),1000)
setTimeout(function(){
}.bind(this), 1000)
setTimeout(function() {
this.rankinglist.pop()
if(this.rankinglist.length == 0){
if (this.rankinglist.length == 0) {
this.leaveto(0)
}
}.bind(this),2500)
}.bind(this), 2500)
}
}else{
this.oldRankinglist = []// 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){
} else {
this.oldRankinglist = [] // 第一次进来记录排队人数
for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({
w:30,x:0
w: 30,
x: 0
})
}
this.rankinglist = this.oldRankinglist
// 当排队人数等于0就开始打印
if(this.rankinglist.length == 0){
if (this.rankinglist.length == 0) {
this.leaveto(1)
}else{
} else {
// 快速切换--排队状态设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){
setTimeout(function() {
this.lineUpState = true
this.data.activebrushX = 0
}.bind(this),4500)
}.bind(this), 4500)
}
}
}else{
} else {
this.leaveto(1)
}
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
leaveto(e){ //e== 1无排队切换打印 0有排队切换打印
leaveto(e) { //e== 1无排队切换打印 0有排队切换打印
clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = null
let time = 3500 //时间
if(e == 1){ //无排队切换打印
if (e == 1) { //无排队切换打印
// 快速切换--设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
time = 4500 //无时间
wx.setNavigationBarTitle({title: '打印区' })
}else if(e == 0){ //有排队切换打印
wx.setNavigationBarTitle({
title: '打印区'
})
} else if (e == 0) { //有排队切换打印
this.LoadState = true
this.leaveUpState = true //排队状态----横向离开滑动动画 时间3s
this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50 //排队状态----横向离开滑动动画 3s
setTimeout(function(){ // 排队页面滑出---打印页面进入
this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth +
50 //排队状态----横向离开滑动动画 3s
setTimeout(function() { // 排队页面滑出---打印页面进入
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),time)
wx.setNavigationBarTitle({title: '打印区' })
}else if(e == 3){
}.bind(this), time)
wx.setNavigationBarTitle({
title: '打印区'
})
} else if (e == 3) {
// 快速切换--设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
time = 500 //无时间
wx.setNavigationBarTitle({title: '打印区' })
wx.setNavigationBarTitle({
title: '打印区'
})
}
setTimeout(function(){
setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画
this.data.printingStartX = 0
}.bind(this),(time + 3500))
}.bind(this), (time + 3500))
// 刷子开始打印手机壳
setTimeout(function(){
setTimeout(function() {
this.initstate = true
this.init()
}.bind(this),(time + 6500))
}.bind(this), (time + 6500))
// 开启定时器查询打印状态
if(this.teststate){
if (this.teststate) {
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),15000)
}else{
}.bind(this), 15000)
} else {
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),10000)
}.bind(this), 10000)
}
},
clearIntervalTime(){// 清除定时器
clearIntervalTime() { // 清除定时器
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -1055,38 +1187,38 @@
})
});
},
tosetClipboardData(id){ // 复制成功
tosetClipboardData(id) { // 复制成功
uni.setClipboardData({
data: id,
success: function () {
uni.showToast({
title: '复制成功',
icon:'none',
duration: 2000
});
}
data: id,
success: function() {
uni.showToast({
title: '复制成功',
icon: 'none',
duration: 2000
});
}
});
},
callPhone (phone) { //拨打电话
callPhone(phone) { //拨打电话
uni.makePhoneCall({
phoneNumber: this.phone || '18938664545'
})
},
previewImg(goods, index) {//预览图片
previewImg(goods, index) { //预览图片
let img = goods.works_image
uni.previewImage({
current: index,
urls: [img]
});
},
getDetail() {
homeservice.WorksList({
machine_id: this.machine_id,
s: 'machine.newDetail'
}).then(res => {
if (res) {
this.phone = res.phone;
this.phone = res.phone;
}
//uni.stopPullDownRefresh();
//uni.hideLoading();
......@@ -1097,12 +1229,9 @@
this.myheadtext = '歇一歇' //头部标题栏
});
},
},
onLoad(options) {
console.log(options)
// orderId=161819487100005361&type=null&machine_id=100012
......@@ -1113,12 +1242,12 @@
this.queryPage.id = options.orderId
this.type = options.type
this.machine_id = options.machine_id
if(this.$base.mobilePhoneCaseSize){
if (this.$base.mobilePhoneCaseSize) {
this.data = this.$base.mobilePhoneCaseSize
this.leftx = this.data.render_cove_width
}else{
} else {
var that = this;
wx.getSystemInfo({//获取屏幕宽高
wx.getSystemInfo({ //获取屏幕宽高
success: function(res) {
let pixelRate = res.windowWidth / 750;
that.data.windowWidth = res.windowWidth // 屏幕宽度
......@@ -1130,20 +1259,24 @@
this.getDetail();
this.loadData();
},
onshow(){
this.data.activebrushX = '-500'//排队盒子动画坐标
onshow() {
this.data.activebrushX = '-500' //排队盒子动画坐标
this.printingStart = false
this.data.printingStartX = '-500'//生产中盒子动画坐标
this.data.printingStartX = '-500' //生产中盒子动画坐标
},
onUnload() {
onUnload() {
this.clearIntervalTime()
let pages = getCurrentPages();
// console.log(pages)
if(this.tomallstate){
if(pages[pages.length - 2].route == "pages/mine/order"){
wx.navigateBack({delta: 3})
}else if(pages[pages.length - 2].route == "pages/index/index"){
wx.navigateBack({delta: 2})
if (this.tomallstate) {
if (pages[pages.length - 2].route == "pages/mine/order") {
wx.navigateBack({
delta: 3
})
} else if (pages[pages.length - 2].route == "pages/index/index") {
wx.navigateBack({
delta: 2
})
}
}
}
......@@ -1205,11 +1338,12 @@
}
}
.steps .li.active .steps_img{
.steps .li.active .steps_img {
background: #864BC3;
border: 1upx solid #864BC3;
}
.steps .li.red .steps_img{
.steps .li.red .steps_img {
background: #864BC3;
border: 1upx solid #864BC3;
}
......@@ -1226,22 +1360,27 @@
z-index: 1;
/*放置在数字后面*/
}
.steps .li.red ~ .li.red:after {
background-color: #864BC3;
.steps .li.red~.li.red:after {
background-color: #864BC3;
}
.steps .li.red ~ .li.active:after {
background-color: #864BC3;
.steps .li.red~.li.active:after {
background-color: #864BC3;
}
.steps .li.red ~ .li.wait:after {
background-color: #864BC3;
.steps .li.red~.li.wait:after {
background-color: #864BC3;
}
.steps .li.active ~ .li.wait:after {
background-color: #864BC3;
.steps .li.active~.li.wait:after {
background-color: #864BC3;
}
.steps .li.wait ~ .li.wait:after {
background-color: #B6B6B6;
.steps .li.wait~.li.wait:after {
background-color: #B6B6B6;
}
// 3D动画
.crate-wrapper {
height: 100%;
......@@ -1249,27 +1388,28 @@
align-items: center;
justify-content: center;
}
.brush{
.brush {
position: relative;
transition: all 3s;
transform: translateX(-400px);
}
.twobrush{
.twobrush {
position: relative;
transition: all 3s;
}
.item-text{
.item-text {
transition: all 2s;
transform: translateX(400px);
}
.printer{
.printer {
transform: translateX(0px);
}
// 错误提示信息
.start {
.start_img {
......@@ -1278,11 +1418,13 @@
display: block;
margin: 0upx auto 102upx;
}
.start_title {
font-size: 30upx;
text-align: center;
color: #FFFFFF;
}
.start_text {
width: 70%;
text-align: center;
......@@ -1294,4 +1436,4 @@
line-height: 28upx;
}
}
</style>
</style>
\ No newline at end of file
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "wechat_phone",
"projectname": "kxz-app-phone",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
......
const accountInfo = wx.getAccountInfoSync();
if(!accountInfo.miniProgram.envVersion){
// console.error("获取运行环境失败!");
//console.error("获取运行环境失败!");
}
const baseApi = {
//开发版
develop: "https://tprint.refinecolor.com",
develop: "https://kxz.refinecolor.com",
//develop: "https://tprint.colorpark.cn",
//体验版
trial: "https://tprint.refinecolor.com",
//trial: "https://tprint.colorpark.cn",
trial: "https://kxz.refinecolor.com",
//正式版
release: "https://tprint.colorpark.cn",
release: "https://kxz.colorpark.cn",
};
const baseURL = baseApi[accountInfo.miniProgram.envVersion]
const Env = {
getDevBaseURL: () => baseURL, //开发版
getBaseURL: () => baseURL, //上线版
getmachineId: () => '100022', //'100022',//'100022' /* '100022', *///体验机器编码
getmalltext: () => "色彩公园手机壳",
getmalltext: () => "壳小站打印机",
getAppID: () => "wxdca8810ccd426633",
getcompany: () => "深圳市瑞丰彩科技有限公司",
//跳转-色彩公园小程序
getcompany: () => "广州壳小站科技有限公司",
getappId: () => "wx55b5b6d95c648041",
//getenvVersion: () => "trial",
getenvVersion: () => "release",
......
......@@ -15,7 +15,9 @@ request.interceptors.request.use((config, promise) => {
// JSON格式化,未指定时,默认true
config.parseJson = $n._isNotNull(config.parseJson) ? config.parseJson : true
// 如指定_token == true,则在headers中跟上相关token信息
if (config._token) config.headers['token'] = store.getters.appUser.token;
if (config._token) config.headers['token'] = uni.getStorageSync('token');
//uni.getStorageSync('token');
console.warn('####### API Request: ', config)
return config
})
......
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