Commit d0824a3b by huahua

提交

parent 6584094d
<template> <template>
<!-- 贴图 --> <!-- 贴图 -->
<view class="content" style="width: 100%; height: 100%; position: relative;overflow: hidden;"> <view class="content" style="width: 100%; height: 100%; position: relative;overflow: hidden;">
<veiw>
<!-- <scroll-view scroll-y <scroll-view scroll-y style="width:100%; margin: auto; height:calc(100% - 220upx); overflow: hidden; margin-top: 140upx; ">
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; " <view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx; "
v-for="(item, index) in datalist" :key="index" @click="modeDetail(item)"> v-for="(item, index) in datalist" :key="index" @click="modeDetail(item)">
<view style="width: 139upx; height: 255upx; margin: auto; position: relative;"> <view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
...@@ -15,7 +11,7 @@ ...@@ -15,7 +11,7 @@
style="width: 139upx; height: 200upx; margin: auto; border-radius: 14px; overflow: hidden;" style="width: 139upx; height: 200upx; margin: auto; border-radius: 14px; overflow: hidden;"
:src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_112'" :src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_112'"
mode="aspectFit"></image> mode="aspectFit"></image>
<view style=" margin-top: 5upx; text-align: center; font-size: 22upx; color: #FFFFFF;">{{item.name}}</view> <view style=" margin-top: 5upx; text-align: center; font-size: 22upx; color: #61D119;">{{item.name}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -28,10 +24,8 @@ ...@@ -28,10 +24,8 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</template> </veiw>
<!-- <> -->
</view> </view>
</template> </template>
......
...@@ -2,22 +2,12 @@ ...@@ -2,22 +2,12 @@
<view class="full-width content-color full-height" style="overflow: hidden;"> <view class="full-width content-color full-height" style="overflow: hidden;">
<!-- 自定义头部 --> <!-- 自定义头部 -->
<myhead :worksid="works_id" :title="titlename" :color="'#61D119'" :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> -->
<!-- 登录弹框 --> <!-- 登录弹框 -->
<Signin ref="Signin"></Signin> <Signin ref="Signin"></Signin>
<!-- 裁剪图片 --> <!-- 裁剪图片 -->
<view class="full-width content-color full-height" style="background: black;c" v-show="state"> <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>
<!-- 滑到底图 -->
<!-- <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 v-show="!state" class="full-width content-color full-height" :style="{background: design_color }"> <view v-show="!state" class="full-width content-color full-height" :style="{background: design_color }">
...@@ -27,17 +17,10 @@ ...@@ -27,17 +17,10 @@
<view class="container" :style="{height: data.windowHeight + 'px'}" @touchmove.stop="touchMove" @touchend.stop="touchEnd" @click.stop="itemCancel"> <view class="container" :style="{height: data.windowHeight + 'px'}" @touchmove.stop="touchMove" @touchend.stop="touchEnd" @click.stop="itemCancel">
<!-- 辅助线 --> <!-- 辅助线 -->
<view v-if="guide_left" <view v-if="guide_left" style="border-left: 1px dashed #61D119;position: absolute; height: 100%; z-index: 999; left: calc(50% - 0.5px);"></view>
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'}" style="position: relative;"> <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;"> -->
<!-- 辅助线 --> <!-- 辅助线 -->
<view v-if="guide_top" <view v-if="guide_top"
style="width: 100%; border-top: 1px dashed #61D119;position: absolute; z-index: 999;" style="width: 100%; border-top: 1px dashed #61D119;position: absolute; z-index: 999;"
...@@ -280,19 +263,7 @@ ...@@ -280,19 +263,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 上一步、下一步按钮-->
<!-- <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>
</view>
<view style="overflow: hidden;width: 110upx;height: 110upx;border-radius: 50%;"
v-if="!active && getStocklist.length <= 1 && !guide_left">
<image @click.stop='next' src="../../static/image/icon_nextstep.png" mode="aspectFill"
style="width: 100upx; height: 100upx; margin-left:10upx"></image>
</view>
</view> -->
<view v-if="!guide_left" <view v-if="!guide_left"
style="position: fixed; left:12upx; font-size: 25upx; color: #FFFFFF; bottom: 260upx;opacity: 0;"> style="position: fixed; left:12upx; font-size: 25upx; color: #FFFFFF; bottom: 260upx;opacity: 0;">
<view>{{drag_text_context}}</view> <view>{{drag_text_context}}</view>
...@@ -334,6 +305,7 @@ ...@@ -334,6 +305,7 @@
color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">好的</view> color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">好的</view>
</view> </view>
</view> </view>
<!-- 进度条 --> <!-- 进度条 -->
<view v-if="percent > 0 && percent < 100" <view v-if="percent > 0 && percent < 100"
style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;"> style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;">
...@@ -343,18 +315,19 @@ ...@@ -343,18 +315,19 @@
<ProgressBar :Width="percent" Type="candy"></ProgressBar> <ProgressBar :Width="percent" Type="candy"></ProgressBar>
</view> </view>
</view> </view>
<!-- 菜单栏目 --> <!-- 菜单栏目 -->
<view v-if="!active && !guide_left" class="toolRight" > <view v-if="!active && !guide_left" class="toolRight" >
<view class="tool_li"> <view class="tool_li">
<view class="tool_li" @click="selectPicturePop()" > <view class="tool_li" @click="selectPicturePop()" >
<image @click="cancel('share')" class="tool_li_img" <image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode="" src="../../static/icon_make_diy_back_color.png" mode="aspectFit"
style=" width: 64upx;height: 60upx;"></image> style=" width: 64upx;height: 64upx;"></image>
<view @click="cancel('share')" class="tool_li_text">上传相片</view> <view @click="cancel('share')" class="tool_li_text">上传相片</view>
</view> </view>
<view class="tool_li" @click="showPopup(3)" style="margin-top: 22upx;"> <view class="tool_li" @click="showPopup(3)" style="margin-top: 22upx;">
<image class="tool_li_img" src="../../static/icon/icon_typeface.png" mode=""></image> <image class="tool_li_img" src="../../static/icon/icon_typeface.png" style="width: 50upx;height: 50upx;" mode=""></image>
<view class="tool_li_text">添加文字</view> <view class="tool_li_text">添加文字</view>
</view> </view>
<view class="tool_li" @click="showPopup(2)"> <view class="tool_li" @click="showPopup(2)">
...@@ -382,7 +355,6 @@ ...@@ -382,7 +355,6 @@
v-if="data.itemList[data.cidx].type == 0 && data.itemList[data.cidx].isUpLoadImage"> v-if="data.itemList[data.cidx].type == 0 && data.itemList[data.cidx].isUpLoadImage">
<image class="tool_li_img" style="width: 50upx; height: 38upx;" <image class="tool_li_img" style="width: 50upx; height: 38upx;"
src="../../static/icon_diy_ai.png"></image> src="../../static/icon_diy_ai.png"></image>
<view class="tool_li_text" style="color: #fff;margin-top: 5upx;">AI图像</view>
</view> </view>
</view> </view>
...@@ -541,7 +513,7 @@ ...@@ -541,7 +513,7 @@
<!-- 上传照片选项 --> <!-- 上传照片选项 -->
<uni-popup ref="showpicture" type="bottom" @change="change" style="position: fixed; z-index: 9999;"> <uni-popup ref="showpicture" type="bottom" @change="change" style="position: fixed; z-index: 9999;">
<view class="uni-share" <view class="uni-share"
style="width: 100%; height: 420upx;background: #FFFFFF;text-align: center; border-top-left-radius: 20upx; border-top-right-radius: 20upx; "> style="width: 100%; height: 360upx;background: #FFFFFF;text-align: center; border-top-left-radius: 20upx; border-top-right-radius: 20upx; ">
<view @click.stop='addItemFromCamera' <view @click.stop='addItemFromCamera'
style="color: #333333; font-size: 35upx; height:100upx;padding-top: 30upx;"> style="color: #333333; font-size: 35upx; height:100upx;padding-top: 30upx;">
拍照 拍照
...@@ -551,12 +523,7 @@ ...@@ -551,12 +523,7 @@
上传手机相片 上传手机相片
</view> </view>
<view <view
style="color: #333333; font-size: 35upx; height: 100upx;padding-top: 30upx; border-top: 1upx solid #ebebeb;" style="color: #333333; font-size: 35upx; height: 100upx;padding-top: 28upx; border-top: 15upx solid #ebebeb"
@click.stop='addItemFromeWx'>
导入微信照片
</view>
<view
style="color: #333333; font-size: 35upx; height: 100upx;padding-top: 30upx; border-top: 20upx solid #ebebeb"
@click="selectPicturePopColse()"> @click="selectPicturePopColse()">
取消 取消
</view> </view>
...@@ -638,7 +605,14 @@ ...@@ -638,7 +605,14 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 200upx); z-index: 999; overflow: hidden; background: #282932;"> <view style="position: absolute;
bottom: 0upx;
left: 120upx;
height: 100%;
width: calc(100% - 200upx);
z-index: 999;
overflow: hidden;
background: #fff;">
<scrollModeView ref="scrollModeView" <scrollModeView ref="scrollModeView"
@goodsbrands="goodsbrands" @goodsbrands="goodsbrands"
:windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)"> :windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)">
...@@ -1805,98 +1779,8 @@ ...@@ -1805,98 +1779,8 @@
this.dict_id = obj.goods_id_e.dict_id //产品属性id this.dict_id = obj.goods_id_e.dict_id //产品属性id
this.goods_id = obj.goods_id_e.goods_id //产品id this.goods_id = obj.goods_id_e.goods_id //产品id
this.goods_size = obj.goods_id_e.modeltext // 品牌名 this.goods_size = obj.goods_id_e.modeltext // 品牌名
/* if (obj.switchBrandState == 2) { //切换手机壳
this.backgroundColor = false //控制底色
this.data.loadbgImageheightstate = true
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, //手机底色
}
//console.log(this.$base.surfaceData)
this.surface_type = this.$base.surfaceData.surface_type
this.surfaceName = this.$base.surfaceData.surfaceName
if (this.$base.surfaceData.surface_type == 0) { //默认
this.background_color = null //手机底色
// this.background_surface_color = null //定制壳手机壳底色
}
if (this.$base.surfaceData.surface_type == 1) { //自带壳
this.background_color = this.$base.surfaceData.surface_color_id_text //手机底色
items = []; // 当前显示的图片列表
index = 0; // 所点击的图片的索引
snapshot = []; // 操作历史记录清空
snapshotIndex = -1;
this.data.itemList = items //赋值
this.saveSnapshot();
}
if (this.$base.surfaceData.surface_type == 2) { //定制壳
//this.background_color =this.$base.surfaceData.surface_color;
//this.background_color = 'none'
this.background_surface_color = this.$base.surfaceData.surface_color //定制壳手机壳底色
}
this.goodslist() // 获取产品详情数据
if (this.key != 2) {
this.orderNewLockAttrStock() //锁库存
}
} else { //切换手机
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.sn) {
this.sn = obj.sn
}
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.surface_type = this.$base.surfaceData.surface_type
this.surfaceName = this.$base.surfaceData.surfaceName
if (this.$base.surfaceData.surface_type == 0) { //默认
this.background_color = null //手机底色
//this.background_surface_color = null //定制壳手机壳底色
}
if (this.$base.surfaceData.surface_type == 1) { //自带壳
//this.background_color = this.$base.surfaceData.surface_color;
this.background_color = this.$base.surfaceData.surface_color_id_text //手机底色
//this.background_surface_color = null //定制壳手机壳底色
//清空历史记录
items = []; // 当前显示的图片列表
index = 0; // 所点击的图片的索引
snapshot = []; // 操作历史记录清空
snapshotIndex = -1;
this.data.itemList = items //赋值
this.saveSnapshot();
}
if (this.$base.surfaceData.surface_type == 2) { //定制壳
this.background_color = 'none'
//this.background_color = this.$base.surfaceData.surface_color
//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() // 获取产品详情数据 this.goodslist() // 获取产品详情数据
this.orderNewLockAttrStock() this.orderNewLockAttrStock()
/* if (this.key != 2) {
this.orderNewLockAttrStock() //锁库存
} */
// 作品分类 贴图分类
//this.category()
}, },
orderNewLockAttrStock() { orderNewLockAttrStock() {
homeservice.queryList({ // 释放锁定库存 homeservice.queryList({ // 释放锁定库存
...@@ -2381,48 +2265,6 @@ ...@@ -2381,48 +2265,6 @@
icon: 'none' 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, //设备编号
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
})
})
} else {
this.$nextTick(() => {
this.$refs['switchBrands'].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
})
})
} */
}, },
...@@ -4789,6 +4631,7 @@ ...@@ -4789,6 +4631,7 @@
}); });
}.bind(this), 120000) }.bind(this), 120000)
}, },
//获取作品明细 //获取作品明细
getWorkDetail() { getWorkDetail() {
...@@ -4799,7 +4642,7 @@ ...@@ -4799,7 +4642,7 @@
itemTouchEnd: infoListTouchEvent.end.bind(infoListTouchEvent), itemTouchEnd: infoListTouchEvent.end.bind(infoListTouchEvent),
itemTouchCancel: infoListTouchEvent.cancel.bind(infoListTouchEvent), itemTouchCancel: infoListTouchEvent.cancel.bind(infoListTouchEvent),
// 获取库存与优惠券信息 //获取库存与优惠券信息
getMachineStock() { getMachineStock() {
homeservice.queryList({ homeservice.queryList({
s: 'Machine.getMachineStock', s: 'Machine.getMachineStock',
...@@ -4807,14 +4650,11 @@ ...@@ -4807,14 +4650,11 @@
key: 3 key: 3
}).then(result => { }).then(result => {
this.coupon = result.coupon this.coupon = result.coupon
this.sizetext_id = this.$base.lockInventory.id this.sizetext_id = this.$base.lockInventory.id
this.sizetext = this.$base.lockInventory.goods_size this.sizetext = this.$base.lockInventory.goods_size
this.sizestock = this.$base.lockInventory.stock this.sizestock = this.$base.lockInventory.stock
this.channel_no = this.$base.lockInventory.channel_no this.channel_no = this.$base.lockInventory.channel_no
this.dict_id = this.$base.lockInventory.dict_id this.dict_id = this.$base.lockInventory.dict_id
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.msg, title: err.msg,
...@@ -4823,10 +4663,39 @@ ...@@ -4823,10 +4663,39 @@
}); });
}, },
getDetail() {
uni.showLoading({
title: '正在加载中...',
mask: true
})
homeservice.WorksList({
machine_id: this.machine_id,
s: 'machine.newDetail'
}).then(res => {
if (res) {
this.machineDetail = res;
}
uni.stopPullDownRefresh();
uni.hideLoading();
}).catch(err => {
});
},
}, },
onLoad(options) { onLoad(options) {
this.options = options this.options = options
/* if(!this.options){
var url = Env.getBaseURL();
if (url.indexOf("refinecolor") != -1) {
this.options.machine_id = 100022;
this.options.goods_id = 301;
this.options.key = 3;
this.options.sn = 1703559495379168;
this.options.dict_id = 1372;
}
} */
let app = uni.getSystemInfoSync(); let app = uni.getSystemInfoSync();
//胶囊信息 //胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
...@@ -4866,7 +4735,6 @@ ...@@ -4866,7 +4735,6 @@
that.$refs.index.init(); that.$refs.index.init();
} }
} else { } else {
//点击选中部件
that.itemClick(e); that.itemClick(e);
} }
} }
...@@ -4965,14 +4833,28 @@ ...@@ -4965,14 +4833,28 @@
this.data.itemList = items this.data.itemList = items
}.bind(this), }.bind(this),
}) })
if (options.machine_id != undefined) { // 判断是从设备进来
this.machine_id = options.machine_id // 设备id
this.queryPage.machine_id = options.machine_id // 设备id
}
if (options.machineDetail != undefined && options.machineDetail != "") { if (options.machineDetail != undefined && options.machineDetail != "") {
try { try {
this.machineDetail = JSON.parse(decodeURIComponent(options.machineDetail)); //获取设备详情数据 this.machineDetail = JSON.parse(decodeURIComponent(options.machineDetail)); //获取设备详情数据
console.log(this.machineDetail)
this.diy_upload_menu = this.machineDetail.diy_upload_menu this.diy_upload_menu = this.machineDetail.diy_upload_menu
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
}else{
var url = Env.getBaseURL();
if (url.indexOf("refinecolor") != -1) {
if (options.machine_id == undefined) { // 判断是从设备进来
this.machine_id = 100022 // 设备id
this.queryPage.machine_id = 100022 // 设备id
}
}
this.getDetail();
} }
if (options.type) { if (options.type) {
if (options.type == 3) { if (options.type == 3) {
...@@ -4983,10 +4865,6 @@ ...@@ -4983,10 +4865,6 @@
this.translateX = -400; this.translateX = -400;
} }
} }
if (options.machine_id != undefined) { // 判断是从设备进来
this.machine_id = options.machine_id // 设备id
this.queryPage.machine_id = options.machine_id // 设备id
}
this.machineGetBaseSetting() this.machineGetBaseSetting()
//获取屏幕宽高 //获取屏幕宽高
wx.getSystemInfo({ wx.getSystemInfo({
...@@ -5031,16 +4909,13 @@ ...@@ -5031,16 +4909,13 @@
} }
} }
} else { } else {
// 首页进入-默认背景图 //首页进入-默认背景图
that.data.goods_id = options.goods_id ? options.goods_id : 21 // 商品id that.data.goods_id = options.goods_id ? options.goods_id : 21 // 商品id
that.goodslist() // 获取产品详情数据 that.goodslist() // 获取产品详情数据
that.createWorkstext = '保存' that.createWorkstext = '保存'
} }
// 作品分类 贴图分类
//that.category()
} else { } else {
//作品分类 贴图分类 //作品分类 贴图分类
//that.category()
uni.showLoading({ uni.showLoading({
title: '正在加载中...', title: '正在加载中...',
mask: true mask: true
...@@ -5052,7 +4927,7 @@ ...@@ -5052,7 +4927,7 @@
that.createWorkstext = '更新' that.createWorkstext = '更新'
} }
var typefacedata = [] var typefacedata = []
// 字体列表 //字体列表
homeservice.queryList({ homeservice.queryList({
s: 'Material.fontFamilyList' s: 'Material.fontFamilyList'
}).then(result => { }).then(result => {
...@@ -5067,15 +4942,13 @@ ...@@ -5067,15 +4942,13 @@
s: 'Works.detail', s: 'Works.detail',
id: options.works_id id: options.works_id
}).then(result => { }).then(result => {
that.background_color = result.background_color == 'none' ? null : result that.background_color = result.background_color == 'none' ? null : result.background_color
.background_color
that.data.goods_id = result.goods_id that.data.goods_id = result.goods_id
that.data.user_id = result.user_id that.data.user_id = result.user_id
that.shape_image = result.shape_image that.shape_image = result.shape_image
that.shape_id = result.shape_id //形状id that.shape_id = result.shape_id //形状id
that.shape_price = result.shape_price //形状价格 that.shape_price = result.shape_price //形状价格
that.queryPage.goods_category_id = result.goods that.queryPage.goods_category_id = result.goods.goods_category_id //星形接口列表增加,产品分类参数
.goods_category_id //星形接口列表增加,产品分类参数
that.titlename = result.goods.name that.titlename = result.goods.name
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: result.goods.name title: result.goods.name
...@@ -5086,16 +4959,13 @@ ...@@ -5086,16 +4959,13 @@
that.design_width = result.goods.design_width // 设计高度 that.design_width = result.goods.design_width // 设计高度
that.print_width = result.goods.print_width // 设计基础宽度 that.print_width = result.goods.print_width // 设计基础宽度
that.print_height = result.goods.print_height // 设计基础高度 that.print_height = result.goods.print_height // 设计基础高度
that.design_widthrate = result.goods.design_width / result.goods that.design_widthrate = result.goods.design_width / result.goods.print_width // 设计区放大宽度比率
.print_width // 设计区放大宽度比率 that.design_heightrate = result.goods.design_height / result.goods.print_height // 设计区放大高度比率
that.design_heightrate = result.goods.design_height / result.goods
.print_height // 设计区放大高度比率
that.data.editorWidth = that.design_width * pixelRate // 设计宽度 that.data.editorWidth = that.design_width * pixelRate // 设计宽度
that.data.editorHeight = that.design_height * pixelRate // 设计高度 that.data.editorHeight = that.design_height * pixelRate // 设计高度
that.center_scale = result.goods.center_scale // 设计区中心点比率 that.center_scale = result.goods.center_scale // 设计区中心点比率
that.location_scale = result.goods.location_scale // 辅助线比率 that.location_scale = result.goods.location_scale // 辅助线比率
that.editor_top = that.data.editorHeight * Number(that.location_scale) - that.editor_top = that.data.editorHeight * Number(that.location_scale) - 0.5 //辅助线距离
0.5 //辅助线距离
if (options.pages == 'mine') { //设计师页面进来 if (options.pages == 'mine') { //设计师页面进来
that.data.template = result.template that.data.template = result.template
that.data.template_price = result.template_price that.data.template_price = result.template_price
...@@ -5139,56 +5009,28 @@ ...@@ -5139,56 +5009,28 @@
} }
items.push({ items.push({
support_zoom: item support_zoom: item.support_zoom, // 0是不支持缩放,为1时支持缩放
.support_zoom, // 0是不支持缩放,为1时支持缩放 support_drag: item.support_drag, // 0是不支持拖动,为1时支持拖动
support_drag: item is_under: item.is_under ? item.is_under : 0, //贴图是否为背景图
.support_drag, // 0是不支持拖动,为1时支持拖动 is_discount: item.is_discount, //贴图是否用卷
is_under: item
.is_under ? item
.is_under : 0, //贴图是否为背景图
is_discount: item
.is_discount, //贴图是否用卷
idone: item.id, idone: item.id,
id: i + 1, id: i + 1,
type: item.type.value, type: item.type.value,
material_id: item material_id: item.material_id,
.material_id, works_id: item.works_id ? item.works_id : null,
works_id: item original_id: item.original_id,
.works_id ? item
.works_id : null,
original_id: item
.original_id,
index: item.index, index: item.index,
font_family: item font_family: item.font_family.replace('.ttf', ''),
.font_family font_dict_id: item.font_dict_id,
.replace('.ttf', ''), font_style: item.font_style,
font_dict_id: item font_size: item.font_size * pixelRate * that.design_widthrate,
.font_dict_id, font_color: item.font_color,
font_style: item under_color: item.under_color,
.font_style, content: item.content, // 图片地址
font_size: item top: top * pixelRate * that.design_heightrate,
.font_size * left: left * pixelRate * that.design_widthrate,
pixelRate * x: item.center_x * pixelRate * that.design_widthrate,
that y: item.center_y * pixelRate * that.design_heightrate,
.design_widthrate,
font_color: item
.font_color,
under_color: item
.under_color,
content: item
.content, // 图片地址
top: top * pixelRate *
that
.design_heightrate,
left: left *
pixelRate * that
.design_widthrate,
x: item.center_x *
pixelRate * that
.design_widthrate,
y: item.center_y *
pixelRate * that
.design_heightrate,
scale: 1, // 缩放比例 1为不缩放 scale: 1, // 缩放比例 1为不缩放
lastScale: 1, // 上一次的绽放比例 lastScale: 1, // 上一次的绽放比例
oScale: 1, // 缩放比例 1为不缩放 oScale: 1, // 缩放比例 1为不缩放
...@@ -5213,10 +5055,7 @@ ...@@ -5213,10 +5055,7 @@
initialscaling: 1, // 图片初始时缩放比例 initialscaling: 1, // 图片初始时缩放比例
initialScalex: 1, // 图片宽缩放比例 initialScalex: 1, // 图片宽缩放比例
initialScaley: 1, // 图片高缩放比例 initialScaley: 1, // 图片高缩放比例
initialWidth: item initialWidth: item.image_width * pixelRate * that.design_widthrate, // 图片原始宽度
.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 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
...@@ -5244,7 +5083,6 @@ ...@@ -5244,7 +5083,6 @@
}, },
onShow(obj) { onShow(obj) {
if (this.machine_id != null && this.machine_id != "") { if (this.machine_id != null && this.machine_id != "") {
this.machineGetBaseSetting(); this.machineGetBaseSetting();
} }
...@@ -5253,13 +5091,16 @@ ...@@ -5253,13 +5091,16 @@
this.isCustomize = true; this.isCustomize = true;
this.data.goods_id = this.options.goods_id // 商品id this.data.goods_id = this.options.goods_id // 商品id
} }
} }else{
/* var url = Env.getBaseURL();
if (this.translateX > 0) { if (url.indexOf("refinecolor") != -1) {
this.translateX = 0 this.options.machine_id = 100022;
if (!this.isCustomize) { this.options.goods_id = 301;
this.options.key = 3;
} this.options.sn = 1703559495379168;
this.options.dict_id = 1372;
this.data.goods_id = 301// 商品id
} */
} }
if (this.isCustomize) { if (this.isCustomize) {
...@@ -5268,20 +5109,22 @@ ...@@ -5268,20 +5109,22 @@
} }
} else { } else {
if (obj) { if (obj) {
this.data.goods_id = obj // 商品id this.data.goods_id = obj //商品id
if(this.data.goods_id == undefined || this.data.goods_id == "" ){
this.data.goods_id = 301
}
//获取产品详情数据 //获取产品详情数据
this.goodslist() this.goodslist()
} }
} }
var _this = this var _this = this
wx.request({ uni.request({
url: Env.getBaseURL() + '/api/system_config/detail', url: Env.getBaseURL() + '/api/system_config/detail',
method: 'GET', method: 'GET',
data: {}, data: {},
success: function(res) { success: function(res) {
_this.system_config = res.data.data _this.system_config = res.data.data
// _this.system_config.phone_diy.value = 1
} }
}) })
var animation = wx.createAnimation({ var animation = wx.createAnimation({
...@@ -5364,8 +5207,6 @@ ...@@ -5364,8 +5207,6 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
/* justify-content: center; */
/* justify-content: center; */
} }
/* 部件列表和部件操作列表 */ /* 部件列表和部件操作列表 */
...@@ -5399,7 +5240,7 @@ ...@@ -5399,7 +5240,7 @@
} }
.active { .active {
// outline: 0.5upx solid #4EE2AE;
} }
/* 删除、缩放、旋转操作按钮 */ /* 删除、缩放、旋转操作按钮 */
......
<template> <template>
<view class="full-width"> <view class="full-width">
<!-- 登录弹框 --> <!-- 登录弹框 -->
<Signin ref="Signin"></Signin> <Signin ref="Signin"></Signin>
<!-- 自定义头部 --> <!-- 自定义头部 -->
<view class='flex commonHead' :style="{height: titleHeight +'px'}"> <view class='flex commonHead' :style="{height: titleHeight +'px'}">
<view class='commonHead-wrap flex'> <view class='commonHead-wrap flex'>
<!-- <view class='commonHead_left' @click="tomine()">
<view class='commonHead_left_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 class='commonHead_right flex'> <view class='commonHead_right flex'>
<view class='commonHead_right_text line1'>手机壳定制站</view> <view class='commonHead_right_text line1'>手机壳定制站</view>
</view> </view>
......
...@@ -71,10 +71,8 @@ ...@@ -71,10 +71,8 @@
</view> </view>
</view> </view>
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup ref="showshare" type="bottom" <uni-popup ref="showshare" type="bottom"
style="position: relative; z-index: 9998; width: 100%; " :style="{height: data.windowHeight +'px'}"> 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 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;" <view style="position: absolute; bottom: 0; left: 0; height: 100%; width: 100%; z-index: 997; opacity: 0.8;"
@click="cancel('share')"/> @click="cancel('share')"/>
...@@ -86,10 +84,8 @@ ...@@ -86,10 +84,8 @@
<view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}"> <view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}">
<scroll-view class="scroll-container" <scroll-view class="scroll-container"
:style="{height: (data.windowHeight - 160 * data.pixelRate) +'px'}" scroll-y :style="{height: (data.windowHeight - 160 * data.pixelRate) +'px'}" scroll-y
scroll-with-animation v-if="brandList.length > 0" :scroll-into-view="'s' + currentIndex"> scroll-with-animation v-if="brandList.length > 0" >
<view :id="'s' + index" <view :id="'s' + index"
:class="[index == currentId ? 'scroll-item-select' : 'scroll-item-no-select']" :class="[index == currentId ? 'scroll-item-select' : 'scroll-item-no-select']"
v-for="(item, index) in brandList" :key="index" @tap="brandclick(index,item)"> v-for="(item, index) in brandList" :key="index" @tap="brandclick(index,item)">
<image <image
...@@ -100,7 +96,8 @@ ...@@ -100,7 +96,8 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 200upx); z-index: 999; overflow: hidden; background: #282932;"> <view style="position: absolute; bottom: 0upx; left: 120upx; height: 100%; width: calc(100% - 200upx);
z-index: 999; overflow: hidden; background: #fff;">
<scrollModeView ref="scrollModeView" <scrollModeView ref="scrollModeView"
@goodsbrands="goodsbrands" @goodsbrands="goodsbrands"
:windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)"> :windowHeight="(data.windowHeight - 210 * data.pixelRate - classificationHeight)">
...@@ -175,6 +172,7 @@ ...@@ -175,6 +172,7 @@
windowHeight: 0, // 屏幕高度 windowHeight: 0, // 屏幕高度
}, },
currentId: 0, currentId: 0,
classificationHeight: 0,
}; };
}, },
...@@ -298,7 +296,6 @@ ...@@ -298,7 +296,6 @@
uni.navigateTo({ uni.navigateTo({
url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=3' url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=3'
}) })
}).catch(err => { }).catch(err => {
that.$refs.Signin.init(); that.$refs.Signin.init();
}); });
...@@ -307,11 +304,6 @@ ...@@ -307,11 +304,6 @@
} }
}); });
/* uni.navigateTo({
url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key
}) */
}, },
tomakePhoneCall() { tomakePhoneCall() {
...@@ -534,6 +526,7 @@ ...@@ -534,6 +526,7 @@
}).then(result => { }).then(result => {
this.$base.lockInventory = result //锁库存储存信息 this.$base.lockInventory = result //锁库存储存信息
this.sn = result.sn this.sn = result.sn
uni.navigateTo({ 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 + '&key=' + this.key + '&sn=' + this.sn + '&dict_id=' + this.dict_id +
......
static/home_icon_default_no.png

6.17 KB | W: | H:

static/home_icon_default_no.png

20.6 KB | W: | H:

static/home_icon_default_no.png
static/home_icon_default_no.png
static/home_icon_default_no.png
static/home_icon_default_no.png
  • 2-up
  • Swipe
  • Onion skin
static/icon/diy_icon_editor_default.png

871 Bytes | W: | H:

static/icon/diy_icon_editor_default.png

600 Bytes | W: | H:

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

1.62 KB | W: | H:

static/icon/icon_stickers.png

1.36 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

397 Bytes | W: | H:

static/icon/icon_typeface.png

482 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_default_no.png

5.3 KB | W: | H:

static/icon_default_no.png

20.6 KB | W: | H:

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

1.22 KB | W: | H:

static/icon_make_diy_back_color.png

1.7 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/image/icon_confirm.png

673 Bytes | W: | H:

static/image/icon_confirm.png

435 Bytes | W: | H:

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

4.23 KB | W: | H:

static/qiehuan.png

7.38 KB | W: | H:

static/qiehuan.png
static/qiehuan.png
static/qiehuan.png
static/qiehuan.png
  • 2-up
  • Swipe
  • Onion skin
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