Commit dffdd6f2 by huahua

修改头获取

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