Commit 6584094d by huahua

修改样式

parent dffdd6f2
......@@ -38,7 +38,7 @@
}
],
"globalStyle": {
"navigationBarTextStyle": "#ffffff",
"navigationBarTextStyle": "#61D119",
"navigationBarTitleText": "定制",
"navigationBarBackgroundColor": "#141319",
"backgroundColor": "#141319"
......@@ -58,7 +58,8 @@
"path": "lineUp",
"style": {
"navigationBarTitleText": "排队信息",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
{
......@@ -80,7 +81,8 @@
"pages": [{
"path": "order",
"style": {
"navigationBarTitleText": "付款区"
"navigationBarTitleText": "付款区",
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
},
{
......
<template>
<uni-popup ref="Signincenter" type="bottom">
<view class='dialog-container'>
<uni-popup ref="Signincenter" type="bottom" >
<view class='dialog-container' >
<!-- 遮罩 -->
<view
style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;">
</view>
<view
style="width: 100%; height: 1100upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; ">
<view style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;"></view>
<view style="width: 100%; height: 1100upx; background: #fff; 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>
<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>
<image src="../../static/logo.png" mode="aspectFill"
style="width: 109upx; height: 98upx; display: block; margin: 60upx 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 style=" margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;">
为了更好的服务,需要得到您的授权 </view>
<view class="avatarUrl">
<view class="avatarUrl" style="background: #fff;">
<button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
<image :src="avatarUrl" class="refreshIcon"></image>
</button>
</view>
<view class="nickname">
<view class="nickname" style="background: #fff;">
<text>昵称:</text>
<input type="nickname" class="weui-input" :value="nickName" @blur="bindblur" placeholder="请输入昵称"
@input="bindinput" />
@input="bindinput"/>
</view>
<view class="btn">
......@@ -184,6 +178,7 @@
}).then(result => {
uni.setStorageSync('token', result.token)
uni.setStorageSync('uid', result.id)
uni.hideLoading();
uni.showToast({
title: '登录成功',
......@@ -261,6 +256,8 @@
machine_id: that.$base
.machine_id, //用户进入设备id
}).then(result => {
uni.setStorageSync('token', result.token)
uni.setStorageSync('uid', result.id)
uni.hideLoading();
uni.showToast({
title: '登录成功',
......@@ -376,11 +373,11 @@
}
.avatarUrl {
padding: 80upx 0 40upx;
background: #EEE;
padding: 70upx 0 40upx;
background: #fff;
button {
background: #EEE;
background: #fff;
line-height: 80upx;
height: auto;
width: auto;
......
<template>
<!-- 贴图 -->
<view class="content" style="width: 100%; height: 100%; position: relative;overflow: hidden;">
<!-- <scroll-view scroll-y
style="height:100%;width: 100%; overflow: hidden; overflow-y: scroll; position: relative;"> -->
<template slot="content" style="margin-top: 140upx;">
<scroll-view scroll-y style="width:100%; margin: auto; height:1150upx; overflow: hidden; ">
<view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx; "
v-for="(item, index) in datalist" :key="index" @click="modeDetail(item)">
<view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
<view style="display: flex;flex-direction: column;">
<image
style="width: 139upx; height: 200upx; margin: auto; border-radius: 14px; overflow: hidden;"
:src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_112'"
mode="aspectFit"></image>
<view style=" margin-top: 5upx; text-align: center; font-size: 22upx; color: #FFFFFF;">{{item.name}}</view>
</view>
</view>
</view>
<view class="align-center"
style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"
v-if="datalist.length == 0">
<span class="iconfont icon-wushuju"
style="font-size: 100upx; text-align: center; color: #B2B2B2;"></span>
<view style="color: #B2B2B2; text-align: center; line-height: 50upx;font-size: 24upx;">啊嘞,还是一片荒漠
</view>
</view>
</scroll-view>
</template>
<!-- <> -->
</view>
</template>
<script>
import homeservice from '@/service/homeservice.js';
import refresh from '@/components/xing-refresh/xing-refresh.vue';
export default {
props: {
windowHeight: {
type: Number,
default: 563
}
},
components: {
refresh
},
data() {
return {
queryCollectionPage: {
},
Material_categorydatalist: [], //作品、贴图列表
datalist: [], //作品、贴图列表
Material_category: [], //贴图分类
currentId: -1,
/* 控制被选中 */
currentIndex: null,
/* 控制位置 */
tip: '',
showState: false,
type: 0, //默认 0
item: null,
scrollViewTop: 0, //滚动距离
oldScrollViewTop: 0, //旧数据到顶部位置
e: 0, //弹窗类型
backColorVal:"",
catrgoryList:[], //品牌数据
machine_id:"" ,//设备Id
brandsitem:{},
goods_id_e:{},
modeltext: "",
goods_id: "",
dict_id: ""
};
},
mounted() {
},
/**
* 组件的公有方法列表
*/
methods: {
scroll(e) {
if (e.detail.scrollTop > 1) {
this.oldScrollViewTop = e.detail.scrollTop - 0.01
}
},
modeDetail(item) {
//item.isWork = this.isWork;
//this.$emit('Worksdetail', item)
this.brandsitem = item
homeservice.queryList({
s: 'Product.machineDetail', //新接口
machine_id: this.machine_id,
id: this.brandsitem.id //商品id
}).then(result => {
this.modeltext = this.brandsitem.name //机型名
this.goods_id = this.brandsitem.id //产品id
this.dict_id = result.dict_id //产品属性id
this.goods_id_e = {
brandtext: this.brandsitem.name, // 品牌名
modeltext: this.brandsitem.name, // 机型商品名
goods_id: this.brandsitem.id, // 产品id
dict_id: result.dict_id, // 产品属性
}
this.$emit('goodsbrands', {
goods_id_e: this.goods_id_e,
})
//this.$refs['shellShow'].close() //关闭手机壳子弹框
}).catch(err => {
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
open(item) {
this.machine_id = item.machine_id
homeservice.queryList({
s: 'Product.getBrandProducts', //新接口
goods_brand_id: item.id, //品牌id
machine_id: item.machine_id,
key: "3"
}).then(result => {
this.datalist = result // 品牌机型
console.log(this.datalist)
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
}
}
</script>
<style lang="scss">
</style>
......@@ -20,8 +20,7 @@
<view style="width: 100% ;background: #292933;">
<!-- 字体 -->
<view v-if="show && text != 'typeface'" style="display: flex;align-items: center; justify-items: center; border-bottom: 2upx solid #000000;
height: 98upx; ">
<view v-if="show && text != 'typeface'" style="display: flex;align-items: center; justify-items: center; border-bottom: 2upx solid #000000;height: 98upx; ">
<view
style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;">
<input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73"
......@@ -45,13 +44,13 @@
<!-- 色彩公园 {{item.title}} color: item.textlong == true ? '#ffffff' : '#BEBEBE'-->
<text style="font-size: 20upx;">
<text style="font-size: 32upx;"
:style="{'color': data.itemList[data.cidx].font_dict_id == item.id ? '#F56364 !important' : '#ffffff'}">
色彩公园
:style="{'color': data.itemList[data.cidx].font_dict_id == item.id ? '#64DC17 !important' : '#ffffff'}">
壳小站
</text>
<text v-if="item.remark != ''">
{{item.long == true ? '' : '(点击加载)'}}
</text>
<text v-if="item.remark != ''" style="color: #F56364;">
<text v-if="item.remark != ''" style="color: #64DC17;">
{{item.textlong == false ? '(下载失败,点击重新下载)' : ''}}
</text>
</text>
......@@ -69,10 +68,10 @@
v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
<view v-if="data.itemList[data.cidx]">
<view v-if="data.itemList[data.cidx].font_color == item.color && !bg_text_color"
style="width: 68upx; height: 68upx; background: #000000; border: 4upx solid #854AC2; border-radius: 50%;"
style="width: 68upx; height: 68upx; background: #000000; border: 4upx solid #64DC17; border-radius: 50%;"
:style="{background:item.color}"></view>
<view v-else-if="data.itemList[data.cidx].under_color == item.color && bg_text_color"
style="width: 68upx; height: 68upx; background: #000000; border: 4upx solid #854AC2; border-radius: 50%;"
style="width: 68upx; height: 68upx; background: #000000; border: 4upx solid #64DC17; border-radius: 50%;"
:style="{background:item.color}"></view>
<view v-else
style="width: 68upx; height: 68upx; background: #000000; border: 4upx solid #ffffff; border-radius: 50%;"
......@@ -144,12 +143,12 @@
<scroll-view style="width: calc(100% - 40upx); margin: auto; height:300upx; overflow: hidden;"
scroll-y scroll-with-animation>
<view v-for="(item, index) in textlist"
:style="{'font-family': item.fontname,'color': data.itemList[data.cidx].font_family == item.fontname ? '#F56364' : 'none'}"
:style="{'font-family': item.fontname,'color': data.itemList[data.cidx].font_family == item.fontname ? '#64DC17' : 'none'}"
@click="typefaceClick(item,index)" :key="index"
style="font-size: 40upx; color: #FFFFFF; margin: 10upx;">
{{item.text}}
<text
style="font-size: 20upx; color: #F56364;">{{item.textlong ? '' : '(该字体加载失败)'}}</text>
style="font-size: 20upx; color: #64DC17;">{{item.textlong ? '' : '(该字体加载失败)'}}</text>
</view>
</scroll-view>
</view>
......
......@@ -4,7 +4,9 @@
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image v-if="worksid > 0" src="../../../static/recommend/house.png" mode="aspectFit"
style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
<image v-else src="../../../static/recommend/icon_back.png" mode="aspectFit" style="width: 23upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
<image v-else src="../../../static/recommend/icon_back.png" mode="aspectFit" style="width: 42upx; height: 42upx;
margin-top: 20upx;
margin-left: auto; margin-right: auto;"></image>
</view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
</view>
......
<template>
<view class="full-width content-color full-height" style="overflow: hidden;">
<!-- 自定义头部 -->
<myhead :worksid="works_id" :title="titlename" :color="'#864BC3'" :titleShow="true" :backShow="true"
:background="'#131319'"></myhead>
<myhead :worksid="works_id" :title="titlename" :color="'#61D119'" :titleShow="true" :backShow="true" :background="'#131319'"></myhead>
<!-- 礼花 -->
<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> -->
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
<!-- 裁剪图片 -->
<view class="full-width content-color full-height" style="background: black;c" v-show="state">
<kps-image-cutter @ok="onok" @cancel="oncancle" ref="index" :fixed="false"
:properties="properties"></kps-image-cutter>
<kps-image-cutter @ok="onok" @cancel="oncancle" ref="index" :fixed="false" :properties="properties"></kps-image-cutter>
</view>
<!-- 滑到底图 -->
<view :animation="translateXState" v-if="!isCustomize"
<!-- <view :animation="translateXState" v-if="!isCustomize"
style="position: fixed; left: 0; width: 100%; overflow: hidden; height: 100%;"
:style="{ top: textHeight + 'px'}">
<image src="https://img.colorpark.cn/wechat/track/shejiqu_2.png?x-oss-process=image/resize,lfit,w_500"
mode="widthFix" style="width: 100%;">
</image>
</view>
</view> -->
<!-- 设计区域 -->
<view v-show="!state" class="full-width content-color full-height" :style="{background: design_color }">
......@@ -30,17 +28,19 @@
<!-- 辅助线 -->
<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 #61D119;position: absolute; height: 100%; z-index: 999; left: calc(50% - 0.5px);">
</view>
<view :style="{width: data.bgWidth +'px',height: data.editorHeight +'px',transform: 'translateX(' + translateX + 'px) scale(' + transformscale + ')',
<view :style="{width: data.bgWidth +'px',height: data.editorHeight +'px'}" style="position: relative;">
<!-- <view :style="{width: data.bgWidth +'px',height: data.editorHeight +'px',transform: 'translateX(' + translateX + 'px) scale(' + transformscale + ')',
'-webkit-transform': 'translateX(' + translateX + 'px) scale(' + transformscale + ')'}"
:class="{translateXClass:translateX >= 0}"
style="position: relative;transition: all 1s; -webkit-transition: all 1s;">
style="position: relative;transition: all 1s; -webkit-transition: all 1s;"> -->
<!-- 辅助线 -->
<view v-if="guide_top"
style="width: 100%; border-top: 1px dashed #864BC3;position: absolute; z-index: 999;"
style="width: 100%; border-top: 1px dashed #61D119;position: absolute; z-index: 999;"
:style="{top: (data.editorHeight * location_scale - 0.5) +'px'}"></view>
<!-- 部件列表 -->
......@@ -109,12 +109,6 @@
</block>
</view>
<!-- <view
style="position: absolute;z-index: 9;top: 0px; bottom: 0; left: 0px; right: 0px;margin: auto; "
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight + 1) +'px', visibility : !isCustomize ? 'visible' : 'hidden' }">
</view> -->
<!-- 手机壳图 -->
<image :src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400' " mode=""
@load="loadbgImage"
......@@ -132,45 +126,28 @@
<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: 10;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight ) +'px'}">
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight +1) +'px'}">
</image>
<image :animation="translateHide "
:src="data.bgImage + '?x-oss-process=image/resize,lfit,w_400'" mode="" @load="loadbgImage" @error="loadbgImageError" v-if="!isCustomize"
style="position: absolute;z-index: 11;top: 0px; bottom: 0; left: 0px; right: 0;margin: auto"
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight ) +'px'}">
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight+1 ) +'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'}">
:style="{width: (data.editorWidth + 1 ) +'px',height: (data.editorHeight+1 ) +'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'}">
:style="{width: (data.editorWidth + 1) +'px',height: (data.editorHeight +1 ) +'px'}">
</image>
</view>
<!-- <view
style="position: absolute;
z-index: 10;
top: 0px;
bottom: 0;
left: 0px;
right: 0px;
margin: auto;
border: 1upx solid #fff;
background: #00000000;"
:style="{width: (data.editorWidth ) +'px',height: (data.editorHeight ) +'px' }">
</view> -->
<!-- 操作列表 ,top: editory +'px' v-if="editory" front_image_long-->
<view v-if="front_image_long" :class="['operate-list', { 'list-active': data.listActive == true }]"
style="z-index: 10;" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}">
......@@ -239,7 +216,7 @@
:data-id='item.id' @touchstart.stop.prevent="scaleStart($event, 'left-top')"
@touchend.stop.prevent='scaleEnd'>
<view v-if="item.support_zoom == 1" class='frame-left-top'
:style="{'border-left-color': item.typetext =='left-top' ? '#F56364' : '#1784D8', 'border-top-color': item.typetext =='left-top' ? '#F56364' : '#1784D8'}">
:style="{'border-left-color': item.typetext =='left-top' ? '#F56364' : '#61D119', 'border-top-color': item.typetext =='left-top' ? '#F56364' : '#61D119'}">
</view>
</view>
<view v-if="item.activehorn" class='frame-right-top-wrap'
......@@ -247,7 +224,7 @@
:data-id='item.id' @touchstart.stop.prevent="scaleStart($event, 'right-top')"
@touchend.stop.prevent='scaleEnd'>
<view v-if="item.support_zoom == 1" class='frame-right-top'
:style="{'border-right-color': item.typetext =='right-top' ? '#F56364' : '#1784D8', 'border-top-color': item.typetext =='right-top' ? '#F56364' : '#1784D8'}">
:style="{'border-right-color': item.typetext =='right-top' ? '#F56364' : '#61D119', 'border-top-color': item.typetext =='right-top' ? '#F56364' : '#61D119'}">
</view>
</view>
<view v-if="item.activehorn" class='frame-left-bottom-wrap'
......@@ -255,7 +232,7 @@
:data-id='item.id' @touchstart.stop.prevent="scaleStart($event, 'left-bottom')"
@touchend.stop.prevent='scaleEnd'>
<view v-if="item.support_zoom == 1" class='frame-left-bottom'
:style="{'border-left-color': item.typetext =='left-bottom' ? '#F56364' : '#1784D8', 'border-bottom-color': item.typetext =='left-bottom' ? '#F56364' : '#1784D8'}">
:style="{'border-left-color': item.typetext =='left-bottom' ? '#F56364' : '#61D119', 'border-bottom-color': item.typetext =='left-bottom' ? '#F56364' : '#61D119'}">
</view>
</view>
<view v-if="item.activehorn" class='frame-right-bottom-wrap'
......@@ -263,7 +240,7 @@
:data-id='item.id' @touchstart.stop.prevent="scaleStart($event, 'right-bottom')"
@touchend.stop.prevent='scaleEnd'>
<view v-if="item.support_zoom == 1" class='frame-right-bottom'
:style="{'border-right-color': item.typetext =='right-bottom' ? '#F56364' : '#1784D8', 'border-bottom-color': item.typetext =='right-bottom' ? '#F56364' : '#1784D8'}">
:style="{'border-right-color': item.typetext =='right-bottom' ? '#F56364' : '#61D119', 'border-bottom-color': item.typetext =='right-bottom' ? '#F56364' : '#61D119'}">
</view>
</view>
<!-- 图片旋转 -->
......@@ -275,11 +252,11 @@
@touchmove.stop.prevent='rotateMove' @touchend.stop.prevent='rotateEnd'>
</view>
<!-- 辅助线 -->
<view v-if="item.activeguide" style="border-left: 1px dashed #F56364;
<view v-if="item.activeguide" style="border-left: 1px dashed #61D119;
height: 100%;position: absolute; top: 0; z-index: 999; bottom: 0;"
:style="{left: ((item.width / 2) - 0.5) +'px',
transform:'scale(' + item.oScale + ')',height:100 * item.scale + '%',top: (- 100 * (item.scale - 1))/2 + '%'}"></view>
<view v-if="item.activeguide" style="width: 100%; border-top: 1px dashed #F56364;
<view v-if="item.activeguide" style="width: 100%; border-top: 1px dashed #61D119;
position: absolute;z-index: 999;"
:style="{top: ((item.height / 2) - 0.5) +'px',
transform:'scale(' + item.oScale + ')',width:100 * item.scale + '%',left: (- 100 * (item.scale - 1))/2 + '%'}">
......@@ -304,8 +281,8 @@
</view>
</view>
<!-- 上一步、下一步按钮-->
<view :animation="functionHide" v-if="!active && getStocklist.length <= 1 && !guide_left "
style="display: flex;justify-items: center;align-items: center;z-index: 99;position: fixed; bottom: 120upx; opacity: 0;">
<!-- <view v-if="!active && getStocklist.length <= 1 && !guide_left "
style="display: flex;justify-items: center;align-items: center;z-index: 99;position: fixed; bottom: 120upx; ">
<view style="overflow: hidden;width: 110upx;height: 110upx;border-radius: 50%;">
<image @click.stop='prev' src="../../static/image/icon_back_.png" mode="aspectFill"
style="width: 100upx; height: 100upx;"></image>
......@@ -315,8 +292,8 @@
<image @click.stop='next' src="../../static/image/icon_nextstep.png" mode="aspectFill"
style="width: 100upx; height: 100upx; margin-left:10upx"></image>
</view>
</view>
<view :animation="functionHide" v-if="!guide_left"
</view> -->
<view v-if="!guide_left"
style="position: fixed; left:12upx; font-size: 25upx; color: #FFFFFF; bottom: 260upx;opacity: 0;">
<view>{{drag_text_context}}</view>
<view>{{cutting_text_context}}</view>
......@@ -367,46 +344,22 @@
</view>
</view>
<!-- 菜单栏目 -->
<view v-if="!active && !guide_left" class="toolRight" :animation="functionHide" style="opacity: 0;">
<view v-if="!active && !guide_left" class="toolRight" >
<view class="tool_li">
<view class="tool_li" @click="showPopup(99)">
<image class="tool_li_img" src="../../static/icon/icon_history_image.png" mode=""></image>
<view class="tool_li_text">历史作品</view>
</view>
<view class="tool_li" @click="showPopup(23)" v-if="surface_type != 1">
<image class="tool_li_img" src="../../static/icon/icon_form.png" mode=""></image>
<view class="tool_li_text">手机壁纸</view>
</view>
<view class="tool_li" @click="showPopup(2)">
<image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image>
<view class="tool_li_text">贴图素材</view>
</view>
<view class="tool_li" @click="showPopup(24)" v-if="surface_type != 1">
<image class="tool_li_img" src="../../static/icon_make_diy_uplaod_image.png" mode="">
</image>
<view class="tool_li_text">背景底色</view>
</view>
<view class="tool_li" @click="showone = !showone">
<view class="tool_li" @click="selectPicturePop()" >
<image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""
style=" width: 64upx;height: 60upx;"></image>
<view @click="cancel('share')" class="tool_li_text">上传相片</view>
</view>
<view class="tool_li" @click="showPopup(3)"
v-if="system_config.phone_diy.value == 1 && surface_type != 1">
<view class="tool_li" @click="showPopup(3)" style="margin-top: 22upx;">
<image class="tool_li_img" src="../../static/icon/icon_typeface.png" mode=""></image>
<view class="tool_li_text">添加文字</view>
</view>
<!-- 添加涂鸦 -->
<view class="tool_li" @click="ontuya()"
v-if="system_config.phone_diy.value == 1 && surface_type != 1">
<image class="tool_li_img" src="../../static/tuya.png" mode=""></image>
<view class="tool_li_text">添加涂鸦</view>
</view>
<view class="tool_li" @click="wallpaperOnclick()" v-if="machine_id && surface_type != 1">
<image class="tool_li_img" style="width: 67upx; height: 56upx;"
src="../../static/randomwallpaper.png" mode=""></image>
<view class="tool_li_text">智能推荐</view>
<view class="tool_li" @click="showPopup(2)">
<image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image>
<view class="tool_li_text">推荐图片</view>
</view>
</view>
</view>
......@@ -446,13 +399,13 @@
</view>
</view>
<view :animation="functionHide" v-if="!active && !guide_left " @click="topagecategory(0)"
style="z-index: 99;position: fixed; left: 12upx; opacity: 0; top: 200upx;">
<view v-if="!active && !guide_left " @click="topagecategory(0)"
style="z-index: 99;position: fixed; left: 12upx; top: 200upx;">
<image style="width: 120upx; height: 150upx; display: block; margin: auto;"
src="../../static/qiehuan.png" mode=""></image>
</view>
<view :animation="functionHide" class="toolLeft" style="margin-left: 10upx;" @click.stop="removedeleteItem"
<view class="toolLeft" style="margin-left: 10upx;" @click.stop="removedeleteItem"
v-if="data.itemList.length > 0 && !guide_left">
<image style=" width: 50upx;
height: 50upx;
......@@ -464,7 +417,7 @@
margin-top: 10upx;">移除图片</view>
</view>
<view :animation="functionHide" class="toolLeft" style="margin-left: 10upx; margin-top: 130upx"
<view class="toolLeft" style="margin-left: 10upx; margin-top: 130upx"
v-if="(background_color && background_color != 'none') && (surface_type == 0 || surface_type == 2) && !guide_left"
@click.stop="eliminateBackgroundColor()">
<image style="width: 50upx;
......@@ -477,12 +430,12 @@
margin-top: 10upx;">清空底色</view>
</view>
<view v-if="!guide_left" class="toolBottom" :animation="functionHide" style="opacity: 0;">
<view v-if="!guide_left" class="toolBottom" >
<view @click.stop="createWorks" hover-class="hover-class-bg"
:class="['tool_add',available == 0 ? 'grey' : '']"> {{createWorkstext}} </view>
</view>
<!-- 文本字体 -->
<!--文本字体-->
<uni-popup ref="textsettingsshare" type="bottom" @change="change" style="position: fixed; z-index: 9999;">
<view class="uni-share" style="width: 100%; height: 600upx;background: #292933;"
v-if="e_active == 3 || e_active == 4">
......@@ -492,6 +445,7 @@
</textsettings>
</view>
</uni-popup>
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup ref="showshare" :type="type" @change="change"
style="position: relative; z-index: 9998; width: 100%;" :style="{height: data.windowHeight +'px'}">
......@@ -512,14 +466,12 @@
<view v-if="e_active == 2 || e_active == 23 || e_active == 99 || e_active == 24"
class="uni-share full-width" :style="{height: data.windowHeight +'px'}">
<!-- 遮罩 -->
<view
style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 997; opacity: 0.8;"
@click="cancel('share')" />
<view style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 997; opacity: 0.8;"
@click="cancel('share')"/>
<!-- <view style="position: absolute; bottom: 0upx; left: 0; height: 100%; width: calc(100% - 120upx); z-index: 998; background: linear-gradient(0deg, #1B294F, #4E2761, #E73231); opacity: 0.8;"></view> -->
<view
style="position: absolute; bottom: 0upx; left: 0; height: 100%; width: 120upx; z-index: 999; background: #1A1D33; overflow: hidden;">
<view style="width: 120upx; height: 188upx;">
</view>
<view style="width: 120upx; height: 188upx;"></view>
<!-- 一级分类 -->
<view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}"
v-if="e_active == 2 || e_active == 23 || e_active == 99">
......@@ -533,7 +485,9 @@
style="width: 60upx; height: 60upx; display: block;margin:auto; padding: 18upx;"
:src="index == currentId ? item.icon_click : item.icon" mode="aspectFill">
</image>
<view v-if="item.update_flag == 1" style="width: 20upx; height: 20upx;
<view v-if="item.update_flag == 1"
style="width: 20upx;
height: 20upx;
margin-left: 80upx;
background: #ff0000;
z-index:10;
......@@ -559,7 +513,6 @@
</swiper-item>
</swiper>
</view>
<!-- 二级分类 -->
<view id="classification" v-if="e_active == 2 || e_active == 23 "
style="width: 100%; position: relative; z-index: 99;">
......@@ -658,6 +611,43 @@
</view>
</uni-popup>
<!-- 手机品牌型号 -->
<uni-popup ref="showBrandShare" type="bottom"
style="position: relative; z-index: 9998; width: 100%;" :style="{height: data.windowHeight +'px'}">
<view class="uni-share full-width" :style="{height: data.windowHeight +'px'}">
<view style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 997; opacity: 0.8;" @click="cancelshowBrandShare()"/>
<view style="position: absolute;
bottom: 0upx;
left: 0;
height: 100%; width: 120upx;
z-index: 999; background: #1A1D33;
overflow: hidden;">
<view style="width: 120upx; height: 188upx;"></view>
<view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}">
<scroll-view class="scroll-container"
:style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}" scroll-y
scroll-with-animation v-if="brandList.length > 0" :scroll-into-view="'s' + currentIndex">
<view
:class="[index == currentIdBrand ? 'scroll-item-select' : 'scroll-item-no-select']" :id="'s' + index"
v-for="(item, index) in brandList" :key="index" @tap="brandclick(index,item)">
<image
style="width: 60upx; height: 100upx; display: block;margin:auto; padding: 18upx;"
:src="item.icon" mode="aspectFit">
</image>
</view>
</scroll-view>
</view>
</view>
<view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 200upx); z-index: 999; overflow: hidden; background: #282932;">
<scrollModeView ref="scrollModeView"
@goodsbrands="goodsbrands"
:windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)">
</scrollModeView>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
......@@ -685,6 +675,7 @@
import client from '../../util/script.js' // 封装全局变量
import {Base64} from "js-base64"
import CryptoJS from 'crypto-js';
import scrollModeView from './components/scrollModeView.vue';
/*** 色彩公园图片 DIY 功能页*/
var app = getApp(); // 当前APP实例
......@@ -710,7 +701,8 @@
tColorPicker,
firework,
bgColor,
tuya
tuya,
scrollModeView
},
computed: {},
data() {
......@@ -740,6 +732,7 @@
content: '底部弹出 popup',
active: false,
currentId: 0,
currentIdBrand: 0,
/* 控制被选中 */
currentIndex: null,
/* 控制位置 */
......@@ -861,7 +854,7 @@
deleteTop: 0,
deleteWrap: false, //拖拽删除图库
delete_wrap_state: true, //拖拽删除图库
translateX: -800,
translateX: -400,
translateXState: 1,
translateLeft: null,
translateHide: null,
......@@ -894,7 +887,14 @@
customize_size_id: "", //自定义产品Id
history_bannerList: [], //历史作品banner
baseSetting: null, //获取开关信息
loadImageFailCount: 0
loadImageFailCount: 0,
brandList:[],
coupon: null, //优惠劵
sizetext_id: "",
sizetext: "",
sizestock: "",
channel_no: "",
dict_id: ""
};
},
......@@ -906,6 +906,10 @@
methods: {
cancelshowBrandShare(){
this.$refs["showBrandShare"].close();
},
/**
* 读取图片失败操作
* @param e object 事件
......@@ -1786,6 +1790,7 @@
},
goodsbrands(obj) {
this.$refs['showBrandShare'].close();
this.isCustomize = false; //充值自定义
this.filletSize = 0 //设置圆角
this.isCustomizeComplete = false
......@@ -1795,8 +1800,13 @@
this.clipRight = 0;
this.filletSize = 0;
this.options.type = 2;
//this.translateX= -400
if (obj.switchBrandState == 2) { //切换手机壳
this.data.loadbgImageheightstate = false
this.data.goods_id = obj.goods_id_e.goods_id // 商品id
this.dict_id = obj.goods_id_e.dict_id //产品属性id
this.goods_id = obj.goods_id_e.goods_id //产品id
this.goods_size = obj.goods_id_e.modeltext // 品牌名
/* if (obj.switchBrandState == 2) { //切换手机壳
this.backgroundColor = false //控制底色
this.data.loadbgImageheightstate = true
this.$base.surfaceData = {
......@@ -1818,7 +1828,7 @@
}
if (this.$base.surfaceData.surface_type == 1) { //自带壳
this.background_color = this.$base.surfaceData.surface_color_id_text //手机底色
// 清空历史记录
items = []; // 当前显示的图片列表
index = 0; // 所点击的图片的索引
snapshot = []; // 操作历史记录清空
......@@ -1878,13 +1888,13 @@
//this.background_color = this.$base.surfaceData.surface_color
//this.background_color = 'none'
this.background_surface_color = this.$base.surfaceData.surface_color
}
} */
//this.background_color = "#DD8843";
this.goodslist() // 获取产品详情数据
if (this.key != 2) {
this.orderNewLockAttrStock()
/* if (this.key != 2) {
this.orderNewLockAttrStock() //锁库存
}
}
} */
// 作品分类 贴图分类
//this.category()
},
......@@ -2190,7 +2200,6 @@
}
}
homeservice.Workssave(data).then(result => {
uni.hideLoading();
uni.showToast({
......@@ -2198,169 +2207,21 @@
icon: 'none',
mask: true
});
if (this.createWorkstext == '生成' || this.createWorkstext == '立即下单' || this
.createWorkstext == '保存' || this.createWorkstext == '更新') {
if (this.createWorkstext == '生成' || this.createWorkstext == '立即下单' || this.createWorkstext == '保存' || this.createWorkstext == '更新') {
homeservice.setCate({
goodid: result.id,
machine_id: this.machine_id,
goods_id: this.data.goods_id
})
this.customize_size_id = "";
// let customize_size_id = "";
if (result.customize_size_id) {
this.customize_size_id = result.customize_size_id;
}
if (this.key == 2 && this.isComeDelivery) {
//隐藏功能按钮 1s
let functionHideanimation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
functionHideanimation.opacity(0).step()
this.setData({
functionHide: functionHideanimation.export()
})
//手机顶部盒子移动回来
setTimeout(function() {
let animationDelLots = wx.createAnimation({
duration: 2000,
timingFunction: 'ease-out'
})
animationDelLots.translate(0, 0).step(); //向左移动
this.setData({
translateLeft: animationDelLots.export()
})
}.bind(this), 1000)
// 手机顶部和旧背景图消失
setTimeout(function() {
this.isReady = true; // 礼花
let animationDelLots = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animationDelLots.opacity(0).step()
this.setData({
translateHide: animationDelLots.export()
})
// 背景图显示
let animation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
translateXState: animation.export()
})
}.bind(this), 3000)
// 手机壳离开
setTimeout(function() {
this.translateX = ((this.data.windowWidth - this.data
.editorWidth) / 2 + this.data.editorWidth)
}.bind(this), 4000)
setTimeout(function() {
this.isReady = false; // 礼花
uni.navigateTo({
url: '../mine/orderNew?goodid=' + result.id +
'&machine_id=' + this.machine_id +
'&goods_id=' + this.data.goods_id +
'&sn=' + this.sn +
"&support_pay=" + this.support_pay +
"&machineDetail=" + encodeURIComponent(JSON
.stringify(this.machineDetail)) +
"&isCustomize=" + this.isCustomize +
"&titleName=" + this.titlename +
"&customize_size_id=" + this.customize_size_id
})
setTimeout(function() {
isclick = true;
}, 5000)
}.bind(this), 6000)
return;
}
if (this.key == 2) {
this.self_help(loading, result.id)
} else {
// 有设备machine_id
if (this.machine_id != null) {
//隐藏功能按钮 1s
let functionHideanimation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
functionHideanimation.opacity(0).step()
this.setData({
functionHide: functionHideanimation.export()
})
//手机顶部盒子移动回来
setTimeout(function() {
let animationDelLots = wx.createAnimation({
duration: 2000,
timingFunction: 'ease-out'
})
animationDelLots.translate(0, 0).step(); //向左移动
this.setData({
translateLeft: animationDelLots.export()
})
}.bind(this), 1000)
// 手机顶部和旧背景图消失
setTimeout(function() {
this.isReady = true; // 礼花
let animationDelLots = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animationDelLots.opacity(0).step()
this.setData({
translateHide: animationDelLots.export()
})
// 背景图显示
let animation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
translateXState: animation.export()
})
}.bind(this), 3000)
// 手机壳离开
setTimeout(function() {
this.translateX = ((this.data.windowWidth - this.data
.editorWidth) / 2 + this.data.editorWidth)
}.bind(this), 4000)
// 跳转订单
setTimeout(function() {
this.isReady = false; // 礼花
uni.navigateTo({
url: '../mine/order?goodid=' + result.id +
'&machine_id=' + this.machine_id +
'&goods_id=' + this.data.goods_id +
'&sn=' + this.sn +
"&machineDetail=" + encodeURIComponent(JSON
.stringify(this.machineDetail)) +
"&customize_size_id=" + this.customize_size_id
})
setTimeout(function() {
isclick = true;
}, 5000)
}.bind(this), 6000)
} else {
uni.navigateTo({
url: '../mine/nothingmachineid'
})
setTimeout(function() {
isclick = true;
}, 5000)
}
}
} else {
uni.navigateTo({
/* uni.navigateTo({
url: '../mall/myworksDetail?id=' + result.id
})
}) */
}
}).catch(err => {
uni.hideLoading();
......@@ -2376,29 +2237,58 @@
}
},
self_help(loading, works_id) {
/* uni.navigateTo({
url: '../mine/order?goodid=' + works_id + '&machine_id=' + this
.machine_id + '&goods_id=' +
this.data.goods_id + '&sn=' + this.sn + "&machineDetail=" +
encodeURIComponent(JSON.stringify(this.machineDetail)) + "&customize_size_id=" + this.customize_size_id
})
return */
let data = {
s: 'Order.create',
// type: this.key, //1:配送版,2:单机版,3:自助版
type: 2, //1:配送版,2:单机版,3:自助版
type: 3, //1:配送版,2:单机版,3:自助版
machine_id: this.machine_id, //设备
goods_id: this.data.goods_id, //产品
works_id: works_id, //作品
channel_no: null, //货道
dict_id: null, //属性字典id
goods_size: null, //产品尺寸
channel_no: this.channel_no , //货道
//dict_id: null, //属性字典id
dict_id: this.dict_id, //属性字典id
goods_size: this.sizetext, //产品尺寸
works_num: null, //作品
shop_id: null, //商铺
sn: null, //前端查询标志
shop_id: this.machineDetail.shop_id , //商铺
sn: this.sn, //前端查询标志
coupon_id: null, //优惠券id,支付多个id( 1-2-3)
user_address: null, //地址
support_pay: this.support_pay, //单机版是否支付
surface_type: this.$base.surfaceData.surface_type, //材质类型 0:默认 1:自带壳 2:定制壳
surface_id: this.$base.surfaceData.surface_id, //材质对应的编号,没有的话就为0或者不传
surface_color_series_id: this.$base.surfaceData.surface_color_series_id, //选择的色系编号,没有的话就不传或者为0
surface_color_id: this.$base.surfaceData.surface_color_id, //选择的颜色编号,没有的话就不传或者为0
customize_size_id: this.customize_size_id, //自定义Id
}
if (this.support_pay == 1) {
support_pay: 1, //单机版是否支付
}
if (this.coupon.ids != undefined) {
data.coupon_id = this.coupon.ids.join("-")
}
homeservice.WorksList(data).then(result => {
//关闭当前页面,跳转到应用内的某个页面。
this.payment(result.pay, result.order_id)
setTimeout(function() {
isclick = true;
}, 1000)
uni.hideLoading();
}).catch(err => {
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
isclick = true;
});
/* if (this.support_pay == 1) {
uni.navigateTo({
url: '../mine/order?goodid=' + works_id + '&machine_id=' + this
.machine_id + '&goods_id=' +
......@@ -2433,12 +2323,80 @@
});
isclick = true;
});
} */
},
payment(params, order_id) {
let seft = this
uni.requestPayment({
provider: 'wxpay',
timeStamp: params.timeStamp.toString(),
nonceStr: params.nonceStr,
package: params.package,
signType: 'MD5',
paySign: params.sign,
success: (res) => {
uni.showToast({
title: '支付成功,即将打印',
duration: 3000,
icon: 'none'
});
setTimeout(() => {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + seft.machine_id + '&key=' +
seft.key
})
}, 1000)
},
fail: (err = {}) => {
console.log('fail00:' + JSON.stringify(err || ''));
if (err.errMsg && err.errMsg.indexOf('cancel') === -1 || (!err.errMsg)) uni.showToast({
title: '网络异常,请稍后再试',
icon: 'none',
duration: 3000
});
}
});
},
//切换手机
topagecategory(e) {
if (this.key == 2) { //单机版
homeservice.queryList({
s: 'Product.getBrands', //新接口
machine_id: this.machine_id,
key:"3"
}).then(result => {
this.brandList = result;
this.$refs['showBrandShare'].open()
if(this.brandList != null && this.brandList.length > 0 ){
this.brandclick(0,this.brandList[0])
}
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
/* showBrandShare
this.$nextTick(() => {
this.$refs['showBrandShare'].open({
machine_id: this.machine_id, //设备编号
key: this.key, //
goods_id: this.data.goods_id, //产品id
dict_id: this.dict_id, //产品属性id
sn: this.sn, //
switchBrandState: e, //0正常 1跳过选择手机型号 2定制页选择材质
isShowCustomize: this.machineDetail.customize_size == 1 ? true : false,
baseSetting: this.baseSetting
})
})
}
*/
/* if (this.key == 2) { //单机版
this.$nextTick(() => {
this.$refs['switchBrands'].open({
machine_id: this.machine_id, //设备编号
......@@ -2464,9 +2422,17 @@
baseSetting: this.baseSetting
})
})
}
} */
},
brandclick(index,item) {
this.currentIdBrand = index
item.machine_id = this.machine_id
this.$refs['scrollModeView'].open(item)
},
onok(item) {
this.state = false
//赋值就移动了
......@@ -2665,14 +2631,10 @@
angle: parseFloat(item.rotate), // 旋转角度
rotate: parseFloat(item.rotate), // 旋转值
active: false, // 判定点击状态
usedwidth: item.width * pixelRate * this
.design_widthrate, // 预设生成图片的宽度
usedheight: item.height * pixelRate * this
.design_heightrate, // 预设生成图片的高度
width: item.width * pixelRate * this
.design_widthrate, // 预设生成图片的宽度
height: item.height * pixelRate * this
.design_heightrate, // 预设生成图片的高度
usedwidth: item.width * pixelRate * this.design_widthrate, // 预设生成图片的宽度
usedheight: item.height * pixelRate * this.design_heightrate, // 预设生成图片的高度
width: item.width * pixelRate * this.design_widthrate, // 预设生成图片的宽度
height: item.height * pixelRate * this.design_heightrate, // 预设生成图片的高度
rScale: 1, // 图片原始缩放比例
works_id: item.works_id, //模板id
original_id: item.works_id,
......@@ -2742,8 +2704,7 @@
let lef = 0
let ratio = image.width / image.height
let ratiowidth = (this.data.editorWidth * this.mix_scale) / image.width
let ratioheight = (this.data.editorHeight * this.mix_scale) / image
.height
let ratioheight = (this.data.editorHeight * this.mix_scale) / image.height
let resultmix_scale = result.mix_scale || 1
//if (ratio >= 1) { //长方形
width = this.data.editorWidth * this.mix_scale * resultmix_scale
......@@ -2781,10 +2742,8 @@
under_color: '',
content: urlData, // 贴图地址
top: this.editor_top - height / 2, // 初始图片Y坐标,根据画布高/2-图片高/2
left: this.data.editorWidth / 2 - width /
2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth /
2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
left: this.data.editorWidth / 2 - width / 2, // 初始图片X坐标,因为div是相对定位,所以计算是要多减一次移动的距离
x: this.data.editorWidth / 2, // 初始圆心位置,可再downImg之后又宽高和初始的图片位置得出
y: this.editor_top,
scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例
......@@ -3191,6 +3150,7 @@
})
}
},
//关闭所有弹窗回调事件
change(e) {
if (items != null && items.length >= 1) {
......@@ -3207,6 +3167,7 @@
}
}
},
togglePopup(type, open) { //打开弹框
switch (type) {
case 'bottom':
......@@ -3218,6 +3179,7 @@
this.$refs['show' + open].open()
})
},
bgtextcolor() {
this.bg_text_color = !this.bg_text_color
this.$nextTick(() => {
......@@ -3227,6 +3189,7 @@
})
})
},
//文本字体
typefaceClick(typeface) {
//获取当前选中的部件
......@@ -3277,6 +3240,7 @@
}
this.saveSnapshot();
},
//文本加粗
workweight() {
//获取当前选中的部件
......@@ -3291,6 +3255,7 @@
}
this.saveSnapshot();
},
//文本颜色
workcolor(color) {
//获取当前选中的部件
......@@ -3309,6 +3274,7 @@
}
this.saveSnapshot();
},
/**
* 通过旧坐标、旋转角度、圆心计算旋转后点的新坐标
* @param origin 原始坐标对象
......@@ -3331,6 +3297,7 @@
y: newY
};
},
/**
* 通当新坐标、旋转角度、圆心计算旋转后点的旧坐标
* @param origin 原始坐标对象
......@@ -3353,6 +3320,7 @@
y: oldY
};
},
/**
* 计算伸缩后的四个顶部坐标
* @param scale 放大倍部
......@@ -3394,6 +3362,7 @@
centerY: (rightTopY - leftTopY) / 2
};
},
/**
* 计算未伸缩时的四个顶点坐标
* @param left 左上顶点的左距离
......@@ -3429,9 +3398,9 @@
centerY: (rightTopY - leftTopY) / 2
};
},
/**
* 计算四个顶点旋转后的坐标系
*
* @param scalePos 四个顶点未旋转前的坐标系
* @param center 中心点位置
* @param angle 旋转角度
......@@ -3477,9 +3446,9 @@
centerY: (scalePos.rightTopY - scalePos.leftTopY) / 2
};
},
/**
/*
* 计算四个顶点旋转后的旧坐标
*
* @param scalePos 四个顶点未旋转前的坐标系
* @param center 中心点位置
* @param angle 旋转角度
......@@ -3524,7 +3493,8 @@
centerY: (rightTopY - leftTopY) / 2
};
},
/**
/*
* 读取图片操作
* @param e object 事件
* @return void
......@@ -3537,7 +3507,8 @@
this.data.loadbgImageheight = height / rScale
this.data.loadbgImageheightstate = true
},
/**
/*
* 部件点击事件
* @param e object 事件
* @return void
......@@ -3545,11 +3516,9 @@
itemClick(e) {
this.isShowGif = false;
this.isShowMoveMaterial = false;
this.drag_text_context = "单指可拖拽";
this.cutting_text_context = "双指可伸缩";
// 循环数据找到点击点
//循环数据找到点击点
for (let i = 0; i < items.length; i++) {
//关闭点击属性
items[i].active = false; //选中状态
......@@ -3571,7 +3540,7 @@
this.active = true
this.data.listActive = true
this.data.cidx = index
// 初始化的位置
//初始化的位置
drag.initPos(items[index])
},
......@@ -3586,15 +3555,11 @@
//点击画布区域取消聚焦
itemCancel(e) {
//uni.showToast({title: "itemCancel",icon: 'none'});
//console.log('点击画布区域取消聚焦')
this.isShowGif = false;
this.isShowMoveMaterial = true;
this.drag_text_context = "单击可选中";
this.cutting_text_context = "双击可裁剪";
//控制中间Gif动画不显示
this.$refs['textsettingsshare'].close()
if (items.length > 0) {
......@@ -3621,6 +3586,7 @@
// return 235 * this.data.pixelRate;
return (750 - this.design_width) / 2 * this.data.pixelRate;
},
/* 获取编辑区域上边距 */
getTop: function() {
// return this.data.bgHeight * 0.25;
......@@ -3655,11 +3621,9 @@
if (item.type == 1) {
currentText = item.content;
}
item.mLeft = item.left;
item.mTop = item.top;
drag.recordPressDownData(item);
//赋值
this.data.listActive = true
this.data.cidx = index
......@@ -3668,7 +3632,6 @@
},
/* 图片拖动中事件 */
dragMove: function(e) {
// 获取当前选中的部件
......@@ -4379,58 +4342,6 @@
snapshot = listSnapshot
}
//背景淡淡消失
setTimeout(function() {
this.isReady = true; // 撒礼花特效
var animationDelLots = wx.createAnimation({
duration: 400,
timingFunction: 'ease-out'
})
animationDelLots.opacity(0).step()
this.setData({
translateXState: animationDelLots.export()
})
let animation = wx.createAnimation({
duration: 400,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
translateHide: animation.export()
})
}.bind(this), 1000)
// 手机顶部盒子离开视线 2s
setTimeout(function() {
let animationDelLots = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animationDelLots.translate(-((this.data.windowWidth - this.data
.editorWidth) / 2 +
this.data.editorWidth) * 2, 0).step(); //向左移动
this.setData({
translateLeft: animationDelLots.export()
})
}.bind(this), 1300)
let animation = wx.createAnimation({
duration: 400,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
functionHide: animation.export()
})
setTimeout(function() {
this.isReady = true;
}.bind(this), 400)
setTimeout(function() {
this.isReady = false;
this.isCustomizeComplete = true
}.bind(this), 1500)
}).catch(err => {
uni.showToast({
title: err.msg,
......@@ -4496,8 +4407,12 @@
snapshot = listSnapshot
}
/* this.setData({
functionHide: animation.export()
}) */
//进入页面动画
if (this.translateX != 0) {
/* if (this.translateX != 0) {
// 初始化位置
//this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
//this.translateX = - 800
......@@ -4558,7 +4473,7 @@
setTimeout(function() {
this.isReady = false;
}.bind(this), 4000)
}
} */
}).catch(err => {
this.goodslistAgain();
});
......@@ -4631,7 +4546,7 @@
//进入页面动画
if (this.translateX != 0) {
// 初始化位置
this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
/* this.translateX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth)
// 手机壳缓缓移动进入 1s
setTimeout(function() {
this.translateX = 0
......@@ -4680,7 +4595,7 @@
this.setData({
functionHide: animation.export()
})
}.bind(this), 4000)
}.bind(this), 4000) */
} else {
setTimeout(function() {
......@@ -4874,18 +4789,40 @@
});
}.bind(this), 120000)
},
//获取作品明细
getWorkDetail() {
},
itemTouchStart: infoListTouchEvent.start.bind(infoListTouchEvent),
itemTouchMove: infoListTouchEvent.move.bind(infoListTouchEvent),
itemTouchEnd: infoListTouchEvent.end.bind(infoListTouchEvent),
itemTouchCancel: infoListTouchEvent.cancel.bind(infoListTouchEvent)
itemTouchCancel: infoListTouchEvent.cancel.bind(infoListTouchEvent),
// 获取库存与优惠券信息
getMachineStock() {
homeservice.queryList({
s: 'Machine.getMachineStock',
machine_id: this.machine_id,
key: 3
}).then(result => {
this.coupon = result.coupon
this.sizetext_id = this.$base.lockInventory.id
this.sizetext = this.$base.lockInventory.goods_size
this.sizestock = this.$base.lockInventory.stock
this.channel_no = this.$base.lockInventory.channel_no
this.dict_id = this.$base.lockInventory.dict_id
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
},
onLoad(options) {
......@@ -4921,8 +4858,7 @@
that.drag_text_context = "单指可拖拽";
that.cutting_text_context = "双指可伸缩";
var curTime = e.timeStamp
var lastTime = e.currentTarget.dataset
.time // 通过e.currentTarget.dataset.time 访问到绑定到该组件的自定义数据
var lastTime = e.currentTarget.dataset.time //通过e.currentTarget.dataset.time 访问到绑定到该组件的自定义数据
if (curTime - lastTime > 0) {
if (curTime - lastTime < 300) { //是双击事件
if (items[index].type == 0) {
......@@ -4961,8 +4897,7 @@
if (item.scale != 1) {
//初始化的位置
drag.initPosscale(item)
drag.getTransferPositionangle(item.left, item.top, item.width, item.height, item.angle,
item.centerPos, item)
drag.getTransferPositionangle(item.left, item.top, item.width, item.height, item.angle,item.centerPos, item)
//缩放
item.scale = 1;
item.lastScale = 1
......@@ -5033,6 +4968,7 @@
if (options.machineDetail != undefined && options.machineDetail != "") {
try {
this.machineDetail = JSON.parse(decodeURIComponent(options.machineDetail)); //获取设备详情数据
console.log(this.machineDetail)
this.diy_upload_menu = this.machineDetail.diy_upload_menu
} catch (e) {
//TODO handle the exception
......@@ -5044,7 +4980,7 @@
this.translateX = 0;
} else {
this.isCustomize = false;
this.translateX = -800;
this.translateX = -400;
}
}
if (options.machine_id != undefined) { // 判断是从设备进来
......@@ -5281,22 +5217,11 @@
.image_width *
pixelRate * that
.design_widthrate, // 图片原始宽度
initialHeight: item
.image_height *
pixelRate * that
.design_heightrate, // 图片原始高度
initialHeight: item.image_height * pixelRate * that.design_heightrate, // 图片原始高度
frame_left: null, // 裁剪窗口x
image_left: (item
.image_left -
left) *
pixelRate * that
.design_widthrate, // 图片x
image_left: (item.image_left - left) * pixelRate * that.design_widthrate, // 图片x
frame_top: null, // 裁剪窗口y
image_top: (item
.image_top -
top) *
pixelRate * that
.design_heightrate, // 图片y
image_top: (item.image_top - top) * pixelRate * that.design_heightrate, // 图片y
});
}
}
......@@ -5315,7 +5240,9 @@
}
},
});
this.getMachineStock()
},
onShow(obj) {
if (this.machine_id != null && this.machine_id != "") {
......@@ -5331,51 +5258,7 @@
if (this.translateX > 0) {
this.translateX = 0
if (!this.isCustomize) {
setTimeout(function() {
//背景消失
var animationDelLots = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animationDelLots.opacity(0).step()
this.setData({
translateXState: animationDelLots.export()
})
//手机顶部盒子和旧图显示
let animation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
translateHide: animation.export()
})
}.bind(this), 2000)
//手机顶部盒子离开视线
setTimeout(function() {
let animationDelLots = wx.createAnimation({
duration: 2000,
timingFunction: 'ease-out'
})
animationDelLots.translate(-((this.data.windowWidth - this.data.editorWidth) / 2 + this
.data.editorWidth) * 2, 0).step(); //向左移动
this.setData({
translateLeft: animationDelLots.export()
})
}.bind(this), 3000)
//显示功能按钮
setTimeout(function() {
this.isReady = false;
let animation = wx.createAnimation({
duration: 1000,
timingFunction: 'ease-out'
})
animation.opacity(1).step()
this.setData({
functionHide: animation.export()
})
}.bind(this), 5000)
}
}
......@@ -5437,7 +5320,7 @@
setTimeout(function() {
_this.isHasClick = true;
//console.log('我是xx')
}, 5000);
}, 1000);
},
//卸载程序
onUnload() {
......@@ -5528,7 +5411,6 @@
height: 28px;
position: absolute;
z-index: 99;
// background-image: url('http://tprint.refinecolor.com/static/images/wechat/sprites.png');
cursor: pointer;
}
......@@ -5538,7 +5420,6 @@
right: 0;
left: 0;
margin: auto;
// background-position: -50px -10px;
}
.rotate-red {
......@@ -5547,14 +5428,12 @@
right: 0;
left: 0;
margin: auto;
// background-position: -50px -10px;
}
.scale {
background-image: url(../../static/icon/icon_zoom.png);
background-size: 100%;
transform-origin: center;
// background-position: -10px -50px;
}
.frame-left-top-wrap {
......@@ -5564,10 +5443,8 @@
height: 60upx;
left: -30upx;
top: -30upx;
/*background-color: blue;*/
}
.frame-left-top {
position: absolute;
z-index: 100;
......@@ -5590,7 +5467,6 @@
top: 0;
bottom: 0;
transform: scale(1.5);
// border: 1px solid lightgray;
}
.frame-right-top-wrap {
......@@ -5600,7 +5476,6 @@
height: 60upx;
right: -30upx;
top: -30upx;
/*background-color: blue;*/
}
.frame-right-top {
......@@ -5621,7 +5496,6 @@
height: 60upx;
left: -30upx;
bottom: -30upx;
/*background-color: blue;*/
}
.frame-left-bottom {
......@@ -5642,7 +5516,6 @@
height: 60upx;
right: -30upx;
bottom: -30upx;
/*background-color: blue;*/
}
.frame-right-bottom {
......@@ -5665,17 +5538,14 @@
height: 100%;
top: 0;
background: transparent;
/*background: red;*/
}
.left_edge {
position: absolute;
z-index: 99;
left: 0upx;
width: 55upx;
height: 55upx;
/* background: #864BC3; */
top: calc(50% - 20upx);
}
......@@ -5690,7 +5560,6 @@
top: 0;
bottom: 0;
transform: scale(2);
// border: 1px solid lightgray;
}
.rightedge-wrap {
......@@ -5701,7 +5570,6 @@
height: 100%;
background: transparent;
top: 0;
/*background: red;*/
}
.rightedge {
......@@ -5710,10 +5578,8 @@
right: -5upx;
width: 55upx;
height: 55upx;
top: calc(50% - 20upx);
align-items: center;
}
.topedge-wrap {
......@@ -5726,16 +5592,13 @@
left: 0;
right: 0;
margin: auto;
/*background: red;*/
}
.topedge {
position: absolute;
z-index: 99;
//top: 24upx;
width: 55upx;
height: 55upx;
/* background: #864BC3; */
left: 0;
right: 0;
top: 10upx;
......@@ -5752,7 +5615,6 @@
left: 0;
right: 0;
margin: auto;
/*background: red;*/
}
.bottomedge {
......@@ -5761,21 +5623,12 @@
bottom: -15upx;
width: 55upx;
height: 55upx;
/* background: #864BC3; */
left: 0;
right: 0;
margin: auto;
}
// .close {
// background-image: url(../../static/icon/icon_close.png);
// background-size: 100%;
// left: -14px;
// top: -14px;
// // background-position: -10px -10px;
// }
// 上一步、下一步按钮
//上一步、下一步按钮
.operation {
display: flex;
justify-items: center;
......@@ -5857,12 +5710,10 @@
position: fixed;
bottom: 0;
z-index: 1000;
// width: 100%;
display: flex;
align-items: center;
height: 90upx;
right: 0;
// background: #292933;
.tool_li {
width: 25%;
......@@ -5884,7 +5735,7 @@
.tool_add {
width: 228upx;
background: #864BC3;
background: #61D119;
line-height: 90upx;
text-align: center;
color: #FFFFFF;
......@@ -5988,4 +5839,17 @@
.delete-wrap-active {
box-shadow: 0 0 15px #FFFFFF;
}
.scroll-item-select{
//background: #864BC3;
border: 1upx solid #61D119;
}
.scroll-item-no-select{
border: 1upx solid #00000000;
//background: #864BC3;
}
</style>
\ No newline at end of file
......@@ -7,13 +7,13 @@
<!-- 自定义头部 -->
<view class='flex commonHead' :style="{height: titleHeight +'px'}">
<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_img">
<image :src="portraitUrl" style="width: 50upx; height: 50upx; border-radius: 30upx; margin-top: 10upx; background: #FFFFFF;" mode="aspectFill"></image>
</view>
</view>
</view>
</view> -->
<view class='commonHead_right flex'>
<view class='commonHead_right_text line1'>手机壳定制站</view>
</view>
......@@ -48,7 +48,15 @@
<view v-if="LoupanList.length > 0">
<view style="margin-top: 29upx;">
<view v-if="system_config.phone_diy.value == 0" @tap="doubleTap" @touchstart="touchStart"
@touchend="touchEnd"style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center; width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
@touchend="touchEnd"style="position: fixed; z-index: 99;
right: 0;
bottom: 524upx;
display: flex;
align-items: center;
justify-content: center;
width: 100upx; height: 88upx;
background: linear-gradient(92deg, #64DD17, #64DD17);
border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>定制</view>
<view>体验</view>
......
<template>
<view class="full-width full-height">
<view @tap="game" v-if="statusloading == 1"
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: 130upx;
height: 88upx;
background: linear-gradient(92deg, #64DD17, #64DD17);
border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>排队</view>
<view>信息</view>
<view>打印列表</view>
</view>
</view>
<!-- 自定义头部 -->
<myhead :worksid="worksid" :title="myheadtext" :color="'#864BC3'" :titleShow="true" :backShow="true"
<myhead :worksid="worksid" :title="myheadtext" :color="'#64DD17'" :titleShow="true" :backShow="true"
:background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;">
<!-- 轮播图 status-->
......@@ -62,10 +70,50 @@
<text style="font-size: 22upx;">深圳市瑞丰彩科技有限公司</text>
</view>
</view>
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup ref="showshare" type="bottom"
style="position: relative; z-index: 9998; width: 100%; " :style="{height: data.windowHeight +'px'}">
<!-- 贴图、模板形状 -->
<view class="uni-share full-width" :style="{height: data.windowHeight +'px'}">
<view style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 997; opacity: 0.8;"
@click="cancel('share')"/>
<view style="position: absolute; bottom: 0upx; left: 0;
height: 100%; width: 120upx;
z-index: 999; background: #1A1D33;
overflow: hidden;">
<view style="width: 120upx; height: 188upx;"></view>
<view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}">
<scroll-view class="scroll-container"
:style="{height: (data.windowHeight - 160 * data.pixelRate) +'px'}" scroll-y
scroll-with-animation v-if="brandList.length > 0" :scroll-into-view="'s' + currentIndex">
<view :id="'s' + index"
:class="[index == currentId ? 'scroll-item-select' : 'scroll-item-no-select']"
v-for="(item, index) in brandList" :key="index" @tap="brandclick(index,item)">
<image
style="width: 60upx; height: 100upx; display: block;margin:auto; padding: 18upx;"
:src="item.icon" mode="aspectFit">
</image>
</view>
</scroll-view>
</view>
</view>
<view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 200upx); z-index: 999; overflow: hidden; background: #282932;">
<scrollModeView ref="scrollModeView"
@goodsbrands="goodsbrands"
:windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)">
</scrollModeView>
</view>
</view>
</uni-popup>
<!-- 手机壳品牌 -->
<switchBrands ref="switchBrands" @goodsbrands="goodsbrands" @toCustomSize="toCustomSize()"></switchBrands>
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
</view>
</template>
......@@ -78,6 +126,8 @@
import FrImage from '@/components/fr-image/fr-image.vue'
import switchBrands from './components/switchBrands.vue'; // 手机壳
import Env from '@/util/Env.js';
import scrollModeView from './components/scrollModeView.vue'; // 贴图
export default {
components: {
uniPopup,
......@@ -85,6 +135,7 @@
Signin,
FrImage,
switchBrands,
scrollModeView
},
computed: {},
data() {
......@@ -117,27 +168,66 @@
baseSetting: null, //配置信息
moduleInfo: null, //识别型号信息
show_admin_login: 0, // 显示是否显示代理
brandList: [],
modeList: [],
data: {
windowWidth: 0, // 屏幕宽度
windowHeight: 0, // 屏幕高度
},
currentId: 0,
};
},
methods: {
cancel(type) {
this.$refs['showshare'].close()
},
//调转代理小程序
toProxyApplet() {
var url = Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
wx.navigateToMiniProgram({
appId: 'wx9cd3934f286f3d71',
envVersion: envVersionName,
path: 'pages/index/start-up?machine_id=' + this.machine_id + "&partner_id=" + this.list.partner_id + "&appletType=1",
success(res) {
//关闭所有弹窗回调事件
change(e) {
},
getBrandList() {
homeservice.queryList({
s: 'Product.getBrands', //新接口
machine_id: this.machine_id,
key:"3"
}).then(result => {
this.brandList = result;
this.isNowCustomized = false;
this.$refs['showshare'].open()
if(this.brandList != null && this.brandList.length > 0 ){
this.brandclick(0,this.brandList[0])
}
})
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
brandclick(index,item) {
this.currentId = index
item.machine_id = this.machine_id
this.$refs['scrollModeView'].open(item)
},
modelclick(e) {
homeservice.queryList({
s: 'Product.machineDetail', //新接口
machine_id: this.machine_id,
id: e.id //品牌id
}).then(result => {
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
//首次进来检查是否
......@@ -186,30 +276,44 @@
},
goodsbrands(obj) {
this.$refs['showshare'].close()
this.brandtext = obj.goods_id_e.modeltext // 品牌名
this.modeltext = obj.goods_id_e.modeltext //机型名
this.goods_id = obj.goods_id_e.goods_id //产品id
this.dict_id = obj.goods_id_e.dict_id //产品属性id
this.$base.surfaceData = {
surface_type: obj.surface_type, //材质类型 0:默认 1:自带壳 2:定制壳
surface_id: obj.surface_id, //材质对应的编号,没有的话就为0或者不传
surface_color: obj.surface_color, //材质颜色
surfaceName: obj.surfaceName, //材质名称
surface_color_series_id: obj.surface_color_series_id, //选择的色系编号,没有的话就不传或者为0
surface_color_id: obj.surface_color_id, //选择的颜色编号,没有的话就不传或者为0
surface_color_series_id_text: obj.surface_color_series_id_text,
surface_color_id_text: obj.surface_color_id_text,
}
this.changeChannel()
},
game() {
let that = this;
uni.login({
provider: 'weixin',
success: (res) => {
userService.login({
s: 'Init.init',
code: res.code
}).then(result => {
uni.setStorageSync('token', result.token)
uni.setStorageSync('uid', result.id)
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key
url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=3'
})
}).catch(err => {
that.$refs.Signin.init();
});
},
fail: (res) => {
}
});
/* uni.navigateTo({
url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key
}) */
},
//打电话
tomakePhoneCall() {
uni.showLoading({
title: '跳转中...',
......@@ -255,7 +359,7 @@
that.isLoad = true;
that.getDetail()
},
// 授权失败
//授权失败
fail(err) {
uni.hideLoading();
that.$base.longitude = 0
......@@ -276,7 +380,6 @@
success(res) {
that.getLocation()
},
// 授权失败
fail(err) {
uni.showModal({
title: '提示',
......@@ -304,8 +407,7 @@
var radLat2 = lat2 * Math.PI / 180.0;
var a = radLat1 - radLat2;
var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
.pow(Math.sin(b / 2), 2)));
var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
s = s * 6378.137; // EARTH_RADIUS;
s = Math.round(s * 10000) / 10000;
return s;
......@@ -320,13 +422,8 @@
s: 'Init.init',
code: res.code
}).then(result => {
uni.setStorageSync('token', result.token)
/* uni.setStorage({
})
*/
uni.setStorageSync('uid', result.id)
that.getSetting();
}).catch(err => {
that.$refs.Signin.init();
......@@ -338,64 +435,9 @@
});
},
//获取该手机型号对应的商品信息
DeviceAccessgetModelGoods() {
let isShowCustomizeData = this.list.customize_size == 1 ? true : false;
if (this.moduleInfo != null) {
if (this.catrgoryList.length > 0) { //自动识别
this.$base.appInformation.model = this.moduleInfo.name
this.goods_id = this.moduleInfo.id //产品id
this.$base.goodsOldId = this.moduleInfo.id //产品id
this.$base.goodsTemporaryId = this.moduleInfo.id //产品id
this.dict_id = this.moduleInfo.dict_id //产品属性id
this.modeltext = this.moduleInfo.name //机型名
this.$nextTick(() => {
this.isNowCustomized = false;
this.$refs['switchBrands'].open({
machine_id: this.machine_id,
key: this.key,
goods_id: this.goods_id, //产品id
dict_id: this.dict_id, //产品属性id
sn: this.sn,
switchBrandState: 1, //0正常 1跳过选择手机型号 2定制页选择材质
isShowCustomize: isShowCustomizeData,
baseSetting: this.baseSetting
})
})
} else {
this.$nextTick(() => {
this.isNowCustomized = false;
this.$refs['switchBrands'].open({
machine_id: this.machine_id,
key: this.key,
goods_id: this.goods_id,
dict_id: this.dict_id,
sn: this.sn,
switchBrandState: 0,
isShowCustomize: isShowCustomizeData,
baseSetting: this.baseSetting
//0正常 1跳过选择手机型号 2定制页选择材质
})
})
}
} else {
this.goods_id = null
this.$nextTick(() => {
this.isNowCustomized = false;
this.$refs['switchBrands'].open({
machine_id: this.machine_id,
key: this.key,
goods_id: this.goods_id,
dict_id: this.dict_id,
sn: this.sn,
switchBrandState: 0, //0正常 1跳过选择手机型号 2定制页选择材质
isShowCustomize: this.list.customize_size == 1 ? true : false,
baseSetting: this.baseSetting
})
})
}
this.getBrandList();
},
//获取该手机型号对应的商品信息
......@@ -414,7 +456,6 @@
//查找品牌
productfind() {
//获取品牌数据
homeservice.queryList({
s: 'product.find',
machine_id: this.machine_id,
......@@ -470,40 +511,6 @@
}.bind(this), 3000)
let that = this;
this.tologo()
console.log(this.$AppContext.checkLogin());
/* if (!this.$AppContext.checkLogin()) {
this.tologo()
} else {
if (this.list != null) {
if (this.list.status.value == 1 || this.list.status.value == 2) {
//单机版无视距离
if (this.key == 2) {
if (this.stockstatus == '缺货') {
uni.showToast({
title: '当前机器缺货',
icon: 'none',
duration: 1500
});
} else {
this.OrderlockAttrStock()
}
} else {
that.OrderlockAttrStock()
}
} else if (this.list.status.value == 0 || this.list.status.value == 3 || this.list.status.value ==
4 || this.list.status.value == 5) {
uni.showToast({
title: '设备休息中',
icon: 'none',
duration: 2000
});
}
} else {
}
} */
},
changeChannel() {
......@@ -518,15 +525,6 @@
}
loading = true
if (loading) {
if (this.key == 2) {
uni.navigateTo({
url: '../index/index?machine_id=' + this.machine_id + '&goods_id=' + this.goods_id +
'&key=' + this.key + "&machineDetail=" + encodeURIComponent(JSON.stringify(this
.list)) +
"&isFirstPage=true"
})
} else {
//锁定库存
homeservice.queryList({
s: 'Order.newLockAttrStock',
machine_id: this.machine_id, //设备id
......@@ -537,23 +535,10 @@
this.$base.lockInventory = result //锁库存储存信息
this.sn = result.sn
uni.navigateTo({
url: '../index/index?machine_id=' + this.machine_id + '&goods_id=' + this
.goods_id +
url: '../index/index?machine_id=' + this.machine_id + '&goods_id=' + this.goods_id +
'&key=' + this.key + '&sn=' + this.sn + '&dict_id=' + this.dict_id +
"&machineDetail=" + encodeURIComponent(JSON.stringify(this.list))
})
uni.setStorage({
key: 'setgood',
data: {
sn: this.sn,
brandtext: this.brandtext,
modeltext: this.modeltext,
goods_id: this.goods_id
},
success: function() {
//console.log('success');
}
});
}).catch(err => {
uni.showToast({
title: err.msg || err.data,
......@@ -561,8 +546,8 @@
});
});
}
}
},
change(e) {
},
......@@ -592,6 +577,10 @@
this.msg = "稍等片刻,我很快恢复"
this.myheadtext = '歇一歇' //头部标题栏
this.statusloading = 2
/* var url = Env.getBaseURL();
if (url.indexOf("refinecolor") != -1) {
this.statusloading = 1
} */
uni.stopPullDownRefresh();
uni.hideLoading();
return;
......@@ -603,11 +592,9 @@
this.key = this.list.category.key
this.myheadtext = this.machine_id + '-' + res.code //头部标题栏
if (res.shop_id) {
this.myadress.distance = this.GetDistance(this.myadress.latitude, this.myadress
.longitude, res.shop.latitude, res.shop.longitude).toFixed(2)
this.myadress.distance = this.GetDistance(this.myadress.latitude, this.myadress.longitude, res.shop.latitude, res.shop.longitude).toFixed(2)
}
this.productfind() // 获取品牌数据
//this.toFirstCheck();
}
uni.stopPullDownRefresh();
uni.hideLoading();
......@@ -636,6 +623,7 @@
});
});
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
......@@ -645,51 +633,30 @@
return null;
}
},
//上拉刷新
onReachBottom() {},
//下拉加载
onPullDownRefresh() {
uni.stopPullDownRefresh();
//this.getLocation();
// homeservice.queryList({ // 释放锁定库存
// // s: 'Order.lockAttrStock',
// s: 'Order.newLockAttrStock',
// machine_id: this.machine_id, //设备id
// goods_id: null, //产品
// dict_id: null, //产品属性id
// old_sn: null,
// onlyClear: 1
// }).then(result => {
// uni.stopPullDownRefresh();
// }).catch(err => {
// uni.stopPullDownRefresh();
// uni.showToast({
// title: err.msg || err.data,
// icon: 'none'
// });
// });
},
// 分享转发
},
//分享转发
onShareAppMessage(options) {
var that = this;
// 设置转发内容
//设置转发内容
var shareObj = {
title: '色彩公园手机壳',
path: '/pages/index/start-up?machine_id=' + this.machine_id, // 默认是当前页面,必须是以‘/’开头的完整路径
path: '/pages/index/start-up?machine_id=' + this.machine_id, //默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //转发时显示的图片路径,支持网络和本地,不传则使用当前页默认截图。
success: function(res) { // 转发成功之后的回调     
if (res.errMsg == 'shareAppMessage:ok') {}
}
};
// 来自页面内的按钮的转发
// if (options.from == 'button') {
// var dataid = options.target.dataset; //上方data-id=shareBtn设置的值
// shareObj.imageUrl = dataid.img
// shareObj.path = '/packageA/pages/detail?bbsId=' + dataid.id
// }
// 返回shareObj
return shareObj;
},
onShareTimeline() {
return {
title: '色彩公园手机壳',
......@@ -698,6 +665,7 @@
query: 'kjbfrom=pyq'
}
},
onLoad(options) {
this.machine_id = options.machine_id
if (options.worksid) {
......@@ -715,19 +683,19 @@
}
this.machineGetBaseSetting();
this.DeviceAccessgetModelGoodsFirst();
// if (this.$base.latitude && this.$base.longitude) {
// this.myadress.latitude = this.$base.latitude
// this.myadress.longitude = this.$base.longitude
// this.isLoad = true;
// this.getDetail()
// } else {
// this.getSetting();
// }
this.$base.machine_id = this.machine_id
var that = this;
wx.getSystemInfo({
success: function(res) {
let pixelRate = res.windowWidth / 750;
that.data.windowWidth = res.windowWidth // 屏幕宽度
that.data.windowHeight = res.windowHeight // 屏幕高度
that.data.pixelRate = pixelRate
}
})
},
onShow(options) {
if (this.machine_id != null && this.machine_id != "") {
//this.getDetail();
this.machineGetBaseSetting();
}
},
......@@ -750,7 +718,7 @@
color: #FFFFFF;
margin: 40upx auto 0;
border-radius: 35upx;
background: linear-gradient(to right, #834DC4, #1983D7);
background: linear-gradient(to right, #64DD17, #64DD17);
font-size: 26upx;
}
......@@ -769,7 +737,7 @@
.loginBtn-hover {
background: linear-gradient(to left, #834DC4, #1983D7);
background: linear-gradient(to left, #64DD17, #64DD17);
}
.canbutton {
......@@ -817,11 +785,19 @@
font-size: 28upx;
}
/* 底部分享 */
.uni-share {
position: relative;
display: flex;
flex-direction: column;
z-index: 9999;
}
.modelactive {
color: #553177 !important;
}
// 错误提示信息
//错误提示信息
.start {
.start_img {
width: 260upx;
......@@ -848,4 +824,16 @@
}
}
}
.scroll-item-select{
//background: #864BC3;
border: 1upx solid #61D119;
}
.scroll-item-no-select{
border: 1upx solid #00000000;
//background: #864BC3;
}
</style>
\ No newline at end of file
......@@ -2,11 +2,11 @@
<view class="full-width full-height">
<view style="min-height: 100%;">
<view class="start">
<image src="../../static/logo.jpg" mode="aspectFill" class="start_img"></image>
<view class="start_title">ColorPark</view>
<image src="../../static/logo.png" mode="aspectFill" class="start_img"></image>
<view class="start_title">壳小站</view>
<view class="start_text">{{startText}}</view>
<view class="longTitle">
<view>ColorPark,把爱穿在身上、棒在手心</view>
<!-- <view>壳小站,把爱穿在身上、棒在手心</view> -->
你的第一份爱的定制在这里开始
</view>
<view class="footer_but">
......@@ -74,8 +74,8 @@
lang:'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
//console.log('getUserInfo 获取头像昵称')
//console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true});
uni.login({
......
<template>
<view class="colletion full-width">
<view class="uni-tab-bar full-width">
<view class="content full-width" scroll-y>
<myhead :worksid="works_id" :title="'排队列表'" :color="'#61D119'" :titleShow="true" :backShow="true" :background="'#131319'"></myhead>
<view class="uni-tab-bar full-width" >
<view class="content full-width" scroll-y :style="{marginTop: height + 'px' }">
<view v-if="LoupanList.length == 0 && stateindex == true">
<view class="noData">
<image src="../../static/icon_default_no.png" mode="aspectFill" class="noData_img"></image>
......@@ -15,23 +19,14 @@
<view v-else v-for="(designer, index) in LoupanList" :key="index"
style="background: #282932 !important;margin: 25upx 25upx; border-radius: 20upx;"
@click="self_help_payment(designer)">
<!-- color: #fff; border-bottom: 1upx solid #282A32; -->
<view style="color: #fff; display: flex; align-items: center; justify-content: center;">
<view v-if="designer.user_id != userId" class="border-image-pesudo-no">
<view class="border-image-pesudo-in-no">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<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>
<image
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
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'"
......@@ -39,20 +34,13 @@
</image>
</view>
</view>
<view v-if="designer.user_id == userId" class="border-image-pesudo">
<view class="border-image-pesudo-in">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<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>
<image
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
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'"
......@@ -60,47 +48,72 @@
</image>
</view>
</view>
<view style="width: calc(100% - 360upx);">
<view style="width: calc(100% - 300upx);">
<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;">{{index + 1}}</text>
</view>
<view style="font-size: 24upx; color: #FFFFFF; margin-top: 30upx;">
{{designer.goods_name || ''}}
</view>
</view>
<view style="margin-right: 20upx; margin-left: auto; padding-top:75upx">
<view style="margin-right: 60upx; margin-left: auto; padding-top:20upx" >
<view style="width: 90%;font-size: 28upx;" >
<text style="font-size: 40upx;font-weight: bold; color: #00000000;" v-if="designer.status.value != 1">{{designer.id || ''}}</text>
<text style="font-size: 40upx;font-weight: bold;" v-if="designer.status.value == 1">{{designer.id || ''}}</text>
</view>
</view>
<view style="margin-right: 20upx; margin-left: auto; padding-top:20upx">
<view v-if="designer.status.value == 1"
style="width: 136upx; height: 60upx;background: #7948ea;border-radius:30upx; background: linear-gradient(92deg, #178CE6, #984ACE);opacity: 0.86; ">
style="width: 136upx; height: 60upx;background: #61D119;border-radius:30upx;opacity: 0.86; ">
<view style="text-align: center; font-size: 28upx; color: #FFFFFF; line-height: 60upx;">
打印中 </view>
</view>
<view v-else
style="width: 136upx; height: 60upx;background: transparent;border-radius: 30upx;">
<view style="text-align: center; font-size: 28upx; color: #8148BB; line-height: 60upx;">
style="width: 136upx; height: 60upx;background: #FF8D1A;border-radius: 30upx;">
<view style="text-align: center; font-size: 28upx; color: #000000; line-height: 60upx;">
排队中 </view>
</view>
</view>
<!-- 订单状态 0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用),
6:待入货(弃用),7:取货完成,8:已发货,9:订单完成 -->
<!-- <view v-else style="width: 200upx;">
<view v-if="index == 0">
<view v-if="designer.status.value == 4" style="text-align: center; font-size: 30upx; color: #F56464;">{{designer.status.text}}</view>
<view v-else-if="designer.status.value == 1" style="text-align: center; font-size: 30upx; color: #FF8B00;">{{designer.status.text || ''}}</view>
<view v-else style="text-align: center; font-size: 30upx;">{{designer.status.text}}</view>
</view>
<view v-else>
<view style="text-align: center; font-size: 30upx;line-height: 50upx;">排队中</view>
</view>
</view> -->
</view>
</view>
<!-- 提示 -->
<view v-if="sighstate">
<!-- background:rgba(0,0,0,0.6); -->
<view
style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6); justify-content: center;"
@click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%);
width: 558upx; height: 650upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 20upx; "></image>
</view>
<view
style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:360upx; "></image>
<!-- <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'" mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image> -->
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view>
</view>
</view>
<!-- 提示完 -->
</view>
</view>
</template>
......@@ -109,7 +122,16 @@
import userService from '@/service/UserService';
import Enums from '@/util/Enums';
import Env from '@/util/Env.js';
import uniPopup from '../index/common/uni-popup/uni-popup.vue';
import myhead from '../index/head/head.vue'; // 页眉
export default {
components: {
uniPopup,
myhead
},
computed: {
},
......@@ -133,39 +155,44 @@
animMaind_time: 10000, //动画时间----刷子上下动画时间
designer: null,
userId: null, //用户信息
height :0,
top:0,
};
},
methods: {
closePop(){
//this.$refs["showLineUpPop"].close();
},
self_help_payment(designer) {
if (designer.user_id != this.userId) {
return;
}
homeservice.WorksList({
machine_id: this.queryPage.machine_id,
s: 'machine.detail'
s: 'machine.newDetail',
}).then(res => {
/* uni.showToast({
title: 'jjjjj',
icon: 'none',
duration: 2000
}) */
//this.$refs["showLineUpPop"].open();
//this.$refs['showLineUpPop'].open();
this.designer = designer
if (designer.status.value == 1) {
this.clearIntervalTime()
uni.navigateTo({
url: '../mine/self_help_payment_details?orderId=' + designer
.order_id +
'&type=' + this.key + '&machine_id=' + this.queryPage
.machine_id
})
} else {
if (this.sighstate == true) return;
this.sighstate = true
}
}).catch(err => {
uni.showToast({
/* uni.showToast({
title: '设备休息中',
icon: 'none',
duration: 2000
}); */
});
});
},
tomain() {
uni.navigateBack();
......@@ -245,11 +272,14 @@
this.LoupanList = []
this.queryPage.page = 1;
this.queryPage.total = 0;
var appUser = userService.getCacheAppUser();
if (appUser != null) {
this.userId = appUser.userInfo.id
}
//console.log("userInfo=" + this.userInfo.id);
this.userId = uni.getStorageSync('uid')
let app = uni.getSystemInfoSync();
//胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.height = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight)*2 + 5
this.top = menuButtonInfo.top;
this.loadGoodsList(Enums.DATA_DIRECTION.UP);
this.statetime = setInterval(function() {
this.dataLoadState.pullDownRefresh = false;
......@@ -297,6 +327,7 @@
height: 150upx;
background: #131319;
margin: 25upx 35upx;
margin-left: 0upx;
position: relative;
overflow: hidden;
......@@ -315,6 +346,9 @@
height: 150upx;
background: #131319;
margin: 25upx 35upx;
margin-left: 0upx;
position: relative;
overflow: hidden;
opacity: 0.2;
......@@ -348,9 +382,9 @@
} */
.colletion {
.cart-ticket-null {
/* .cart-ticket-null {
padding-top: 50upx;
}
} */
.content {}
}
......
<template>
<view class="full-width full-height">
<!-- 礼花 -->
<firework ref="firework" v-if="isReady" style="position: fixed;z-index: 9999;"></firework>
<myhead :worksid="'0'" :title="'付款区'" :color="'#61D119'" :titleShow="true" :backShow="true" :background="'#131319'"></myhead>
<scroll-view scroll-y
style="height:100%;width: 100%; overflow: hidden; overflow-y: scroll; position: relative;">
<view :style="{transform: 'translateX(' + translateX + 'px)'}"
style="position: absolute;transition: all 1.5s; height:100%;width: 100%;">
<!-- 设计区底图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/shejiqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<!-- 付款区底图 -->
<view style="position: absolute; top: 0; left: 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>
</view>
<!-- 3D动画 -->
<view class='crate-wrapper' @touchstart.stop="dragStart" @touchmove.stop="dragMove"
@touchend.stop="dragEnd">
<view class="brush"
:style="{transform: 'translateX(' + activebrushX + 'px) scale(' + transformscale + ')'}">
<view class='crate' :class="{crateactive:crateactivestate}" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'rotateX(-15deg) rotateY(' + coordinate.numberY +'deg)'}">
<!-- <view class='side top'>
<image src="../../static/img/c.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view> -->
<!-- <view class='side bottom' :style="{'-webkit-transform': 'translateY(' + (data.editorHeight - 20) + 'px) rotateX(90deg)',
transform: 'translateY(' + (data.editorHeight - 20) + 'px) rotateX(90deg)'}">
<image src="../../static/img/c.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<view class='side left'>
<image src="../../static/img/b.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<view class='side right' :style="{'-webkit-transform': 'translateX(' + (data.editorWidth - 20) + 'px) rotateY(90deg)',
transform: 'translateX(' + (data.editorWidth - 20) + 'px) rotateY(90deg)'}">
<image src="../../static/img/b.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view> -->
<view class="brush">
<view class='crate' :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}" >
<view class='side front' style="background: #FFF;">
<view style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;background: #fff;"></view>
<image :src="( good.icon ? good.icon : good.image )" mode="aspectFit"
......@@ -49,12 +16,8 @@
<image :src="good.goods.front_image " mode="aspectFit"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view>
<!-- <view class='side back'>
<image src="../../static/img/a.png" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;"></image>
</view> -->
</view>
<view style="margin-top: 50upx; text-align: center;" :style="{opacity:titlestate ? 1:0}">
<view style="margin-top: 30upx; text-align: center;" >
<view style="font-size: 40upx; font-weight: bold;">
<text style="color: #FFFFFF;">{{good.goods.name || '**'}}</text>
</view>
......@@ -80,10 +43,13 @@
import Enums from '@/util/Enums';
import md5 from 'js-md5';
import firework from '@/components/ay-firework/firework.vue'; //礼花
import myhead from '../index/head/head.vue'; // 页眉
export default {
components: {
uniPopup,
firework
firework,
myhead
},
computed: {
add(arg1, arg2) {
......@@ -165,21 +131,10 @@
},
methods: {
dragStart(e) {
/*if(!this.coordinate.state) return; // 记录点击时的坐标值
this.coordinate.startX = e.touches[0].clientX;
this.coordinate.startY = e.touches[0].clientY; */
},
dragMove(e) {
/*if(!this.coordinate.state) return;
this.coordinate.touchMoveX = e.touches[0].clientX;
this.coordinate.touchMoveY = e.touches[0].clientY;
if (this.coordinate.touchMoveX > this.coordinate.startX) {
this.coordinate.numberY += this.coordinate.touchMoveX - this.coordinate.startX
} else {
this.coordinate.numberY -= this.coordinate.startX - this.coordinate.touchMoveX
}
this.coordinate.startX = e.touches[0].clientX;
this.coordinate.startY = e.touches[0].clientY; */
},
//拖动结束事件
dragEnd(e) {
......@@ -391,14 +346,20 @@
});
let type = this.tabletext ? 3 : 1 //1:配送版,2:单机版,3:自助版
setTimeout(() => {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + seft.machine_id + '&key=' +
seft.key
})
/* uni.navigateTo({
url: './self_help_payment_details?orderId=' + order_id +
'&type=' + type + '&machine_id=' + seft.machine_id
})
}, 3000)
}) */
}, 1000)
setTimeout(() => {
seft.loading = false;
}, 10000)
}, 5000)
},
fail: (err = {}) => {
console.log('fail00:' + JSON.stringify(err || ''));
......@@ -423,8 +384,6 @@
}).then(result => {
this.coupon = result.coupon
this.stock = result.stock
// machine_id=100012&goods_id=33&goodid=8628&sn=1617263541425371
// 读出锁库存储存信息
this.sizetext_id = this.$base.lockInventory.id
this.sizetext = this.$base.lockInventory.goods_size
this.sizestock = this.$base.lockInventory.stock
......@@ -443,12 +402,7 @@
this.machine_item = this.machineDetail
this.machine_item.machine_category_text = this.machineDetail.category.title
this.key = this.machineDetail.category.key
// this.machine_item.category.forEach(item => {
// if (item.id == this.machine_item.machine_category_id) {
// this.machine_item.machine_category_text = item.title
// this.key = item.key
// }
// })
this.getMachineStock()
// homeservice.WorksList({
// s: 'machine.detail',
......@@ -484,8 +438,12 @@
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.translateX = -this.data.windowWidth
this.activebrushX = 0
this.coordinate.state = true
this.titlestate = true
//背景图移动 1.5s
setTimeout(function() {
/* setTimeout(function() {
this.translateX = -this.data.windowWidth
}.bind(this), 1000)
//手机壳进去页面 1.5s
......@@ -496,7 +454,7 @@
//this.titlestate = true
setTimeout(function() {
this.titlestate = true
}.bind(this), 3500)
}.bind(this), 3500) */
uni.stopPullDownRefresh();
}).catch(err => {
uni.showToast({
......@@ -587,7 +545,7 @@
.brush {
transition: all 1.5s;
transform: translateX(-400px);
transform: translateX(0px);
}
.crate .side {
......
<template>
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }">
<!-- 音乐 -->
<!-- https://img.colorpark.cn/wechat/stitch.m4a -->
<!-- https://img.colorpark.cn/wechat/ring.m4a -->
<!-- https://img.colorpark.cn/wechat/ring2.m4a -->
<audio src="https://img.colorpark.cn/wechat/stitch.m4a" :action="stitchaction" controls loop
style="opacity: 0; position: absolute;"></audio>
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
......@@ -40,10 +37,11 @@
<view style="display: flex;position: relative;">
<view style="position: relative;transition: all 3s; z-index: 2;" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.activebrushX + 'px)'}">
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
<view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view>
<!-- <image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
</image> -->
<!-- <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;">
......@@ -96,10 +94,10 @@
<!-- 底图 -->
<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'"
<!-- <image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
</image> -->
<!-- 作品图 -->
<image v-if="initstate" :src="goods.works_image" mode=""
:style="{'z-index': data.render_cove_width ? 2:0}"
......@@ -152,9 +150,9 @@
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<!-- 底图 -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
<!-- <image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
</image> -->
<!-- <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>
......@@ -179,11 +177,8 @@
<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>
<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>
......
static/icon/icon_refresh.png

918 Bytes | W: | H:

static/icon/icon_refresh.png

1.07 KB | W: | H:

static/icon/icon_refresh.png
static/icon/icon_refresh.png
static/icon/icon_refresh.png
static/icon/icon_refresh.png
  • 2-up
  • Swipe
  • Onion skin
static/icon/icon_refresh_red.png

1.65 KB | W: | H:

static/icon/icon_refresh_red.png

5.37 KB | W: | H:

static/icon/icon_refresh_red.png
static/icon/icon_refresh_red.png
static/icon/icon_refresh_red.png
static/icon/icon_refresh_red.png
  • 2-up
  • Swipe
  • Onion skin
static/icon/icon_stickers.png

876 Bytes | W: | H:

static/icon/icon_stickers.png

1.62 KB | W: | H:

static/icon/icon_stickers.png
static/icon/icon_stickers.png
static/icon/icon_stickers.png
static/icon/icon_stickers.png
  • 2-up
  • Swipe
  • Onion skin
static/icon/icon_typeface.png

555 Bytes | W: | H:

static/icon/icon_typeface.png

397 Bytes | W: | H:

static/icon/icon_typeface.png
static/icon/icon_typeface.png
static/icon/icon_typeface.png
static/icon/icon_typeface.png
  • 2-up
  • Swipe
  • Onion skin
static/icon_confirm.png

1.11 KB | W: | H:

static/icon_confirm.png

1.26 KB | W: | H:

static/icon_confirm.png
static/icon_confirm.png
static/icon_confirm.png
static/icon_confirm.png
  • 2-up
  • Swipe
  • Onion skin
static/icon_make_diy_back_color.png

1.14 KB | W: | H:

static/icon_make_diy_back_color.png

1.22 KB | W: | H:

static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
  • 2-up
  • Swipe
  • Onion skin
static/recommend/icon_back.png

254 Bytes | W: | H:

static/recommend/icon_back.png

3.52 KB | W: | H:

static/recommend/icon_back.png
static/recommend/icon_back.png
static/recommend/icon_back.png
static/recommend/icon_back.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,14 +2,20 @@ const accountInfo = wx.getAccountInfoSync();
if(!accountInfo.miniProgram.envVersion){
//console.error("获取运行环境失败!");
}
/* img.kexiaozhan.cn
render.kexiaozhan.cn
ws.kexiaozhan.cn
print.kexiaozhan.cn */
const baseApi = {
//开发版
develop: "https://kxz.refinecolor.com",
//develop: "https://tprint.colorpark.cn",
//develop: "https://kxz.refinecolor.com",
develop: "https://print.kexiaozhan.cn",
//体验版
trial: "https://kxz.refinecolor.com",
//正式版
release: "https://kxz.colorpark.cn",
release: "https://print.kexiaozhan.cn",
};
const baseURL = baseApi[accountInfo.miniProgram.envVersion]
const Env = {
......
......@@ -12,9 +12,9 @@ import CryptoJS from 'crypto-js';
// callback:结果的回调
// type 1: 人物动漫化 2:人物素描化
function callRecognizeBankCard(imageURL, miniProgramType, type, callback) {
const accessKeyId = "LTAI5tDPiEBZgfqNcWBqaFEc";
const accessKeyId = "LTAI5tQWJ47GrfDaiUw3f5yP";
//AccessKeySecret
const accessKeySecret = "amI84BLFbHz6dhOVbuArrERmeemmnx";
const accessKeySecret = "bMFIqdYnDw3IBZgKw37Zr5IbDqZN8k";
//这里endpoint为API访问域名,与类目相关,具体类目的API访问域名请参考:https://help.aliyun.com/document_detail/143103.html
let endpoint = "facebody.cn-shanghai.aliyuncs.com";
//API Action,能力名称,请参考具体算法文档详情页中的Action参数,这里以银行卡识别为例:https://help.aliyun.com/document_detail/151893.html
......
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