Commit ad6e9815 by huahua

修改

parent a1dc8ef5
...@@ -6,6 +6,7 @@ import nothing from './util/nothing' ...@@ -6,6 +6,7 @@ import nothing from './util/nothing'
import AppContext from './util/AppContext' import AppContext from './util/AppContext'
import Env from './util/Env' import Env from './util/Env'
import base from './util/base.js' import base from './util/base.js'
import http from './util/http.js';
import './css/uni.css' import './css/uni.css'
import './css/main.css' import './css/main.css'
...@@ -17,6 +18,7 @@ Vue.prototype.$nothing = nothing ...@@ -17,6 +18,7 @@ Vue.prototype.$nothing = nothing
Vue.prototype.$AppContext = AppContext Vue.prototype.$AppContext = AppContext
Vue.prototype.$Env = Env Vue.prototype.$Env = Env
Vue.prototype.$base = base Vue.prototype.$base = base
Vue.prototype.$http = http
App.mpType = 'app' App.mpType = 'app'
......
{ {
"pages": [ "pages": [
/* { /*{
"path": "pages/index/mall", "path": "pages/index/mall",
"style": { "style": {
"navigationBarTitleText": "色彩高尔夫", "navigationBarTitleText": "色彩高尔夫",
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, */ }, */
/* { /*{
"path": "pages/index/machineDetail", "path": "pages/index/machineDetail",
"style": { "style": {
"navigationBarTitleText": "色彩高尔夫", "navigationBarTitleText": "色彩高尔夫",
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
} */ } */
{ {
"path": "pages/index/machineDetail", "path": "pages/index/machineDetail",
"style": { "style": {
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
} }
}, },
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
...@@ -39,8 +37,8 @@ ...@@ -39,8 +37,8 @@
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "#ffffff", "navigationBarTextStyle": "#ffffff",
"navigationBarTitleText": "定制", "navigationBarTitleText": "定制",
"navigationBarBackgroundColor": "#141319", "navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#141319" "backgroundColor": "#ffffff"
}, },
"subPackages": [{ "subPackages": [{
"root": "pages/login", "root": "pages/login",
...@@ -54,31 +52,34 @@ ...@@ -54,31 +52,34 @@
{ {
"root": "pages/mall", "root": "pages/mall",
"pages": [ "pages": [
/* {
"path": "machineDetail",
"style": {
"navigationBarTitleText": "色彩站详情",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}, */
{ {
"path": "lineUp", "path": "lineUp",
"style": { "style": {
"navigationBarTitleText": "排队列表", "navigationBarTitleText": "排队列表",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"navigationStyle": "custom"
} }
} }
] ]
}, },
{ {
"root": "pages/mine", "root": "pages/mine",
"pages": [{ "pages": [
{
"path": "self_help_payment_details", "path": "self_help_payment_details",
"style": { "style": {
"navigationBarTitleText": "打印" "navigationBarTitleText": "打印"
} }
}, },
{
"path": "self_help_payment_details_new",
"style": {
"navigationBarTitleText": "打印"
}
},
{ {
"path": "order", "path": "order",
"style": { "style": {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
} }
.noData_title { .noData_title {
color: #FFFFFF; color: #333333;
text-align: center; text-align: center;
font-size: 36upx; font-size: 36upx;
} }
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
height: 70upx; height: 70upx;
line-height: 70upx; line-height: 70upx;
text-align: center; text-align: center;
color: #F56364; color: #F29F3D ;
margin:140upx auto 0; margin:140upx auto 0;
border: 1upx solid #F56364; border: 1upx solid #F29F3D;
border-radius: 35upx; border-radius: 35upx;
} }
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;"> <view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;">
<view class="head" :style="{ height: height + 'px', background:background}"> <view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }"> <view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back.png" mode="aspectFit" <image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
style="width: 23upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image> style="width: 32upx; height: 32upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
</view> </view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view> <view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
</view> </view>
......
...@@ -6,7 +6,7 @@ const drag = { ...@@ -6,7 +6,7 @@ const drag = {
var minwwidth = 50 var minwwidth = 50
var minwheight = 50 var minwheight = 50
var shock = true var shock = true
console.log("type="+item.type)
if(item.type == 0 || item.type == 2){ if(item.type == 0 || item.type == 2){
minwwidth = 50 minwwidth = 50
minwheight = 50 minwheight = 50
...@@ -104,7 +104,6 @@ const drag = { ...@@ -104,7 +104,6 @@ const drag = {
item.height = newHeight item.height = newHeight
if(item.left != 0 && item.top != 0){ if(item.left != 0 && item.top != 0){
// console.log('top-left' + '-------' + item.top)
// 修改初始化原始图片比率-坐标 // 修改初始化原始图片比率-坐标
item.initialScale = item.initialScale * scaleWidth item.initialScale = item.initialScale * scaleWidth
item.initialscaling = item.initialscaling * scaleWidth item.initialscaling = item.initialscaling * scaleWidth
...@@ -715,6 +714,11 @@ const drag = { ...@@ -715,6 +714,11 @@ const drag = {
* @description: 初始化targetObj的位置 * @description: 初始化targetObj的位置
*/ */
initPos(item) { initPos(item) {
if(item == null){
//this.bg_initPos(item)
return
}
// 记录初始盒子位置右下 // 记录初始盒子位置右下
item.rightBottomPoint = { item.rightBottomPoint = {
x: item.width + item.left, x: item.width + item.left,
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="false" <myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="false"
:background="'none'"></myhead> :background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;"> <view style="position: relative;width: 100%; height: 100%; z-index: 2;">
<!-- 轮播图 --> <!-- 轮播图 -->
<view v-if="statusloading == 1" class='swiper-box' style="width: 100%; height: 100%;"> <view v-if="statusloading == 1" class='swiper-box' style="width: 100%; height: 100%;">
<swiper :autoplay="true" :interval="3000" :duration="1000" @change="swiperChange" <swiper :autoplay="true" :interval="3000" :duration="1000" @change="swiperChange"
...@@ -11,8 +13,6 @@ ...@@ -11,8 +13,6 @@
<swiper-item v-for="(item, index) in Adlists" :key="index" class="swiper-item full-width"> <swiper-item v-for="(item, index) in Adlists" :key="index" class="swiper-item full-width">
<image style="width: 100%; height: 100%; margin: auto; display: block;" <image style="width: 100%; height: 100%; margin: auto; display: block;"
:src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image> :src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image>
<!-- <fr-image :src="item.content + '?x-oss-process=image/resize,lfit,w_750'"
mode="aspectFill" loading-ing-img="two-balls"/> -->
</swiper-item> </swiper-item>
</swiper> </swiper>
<view style="position: fixed; bottom: 232upx; text-align: center;left: 0; right: 0;"> <view style="position: fixed; bottom: 232upx; text-align: center;left: 0; right: 0;">
...@@ -24,20 +24,15 @@ ...@@ -24,20 +24,15 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view @click="Customize_now"
style="position: fixed; bottom: 112upx; left: 0; right: 0;
width: 200upx; height: 200upx; border-radius: 50%; margin: auto;"> <view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 100upx; left: 0; right: 0; margin: auto;
<image src="../../static/golf.png" mode="" width: 300upx; height: 100upx;
style="width: 200upx; height: 200upx; border-radius: 50%; background: linear-gradient(92deg, #F29F3D, #67C4CA);
position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: -1;"></image> box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
<view style="color: #43cf7c; text-align: center; line-height: 200upx;font-size: 30upx; font-weight: bold;">开始定制</view> border-radius: 40px;">
</view> --> <view style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 160upx; left: 0; right: 0; margin: auto; 立即定制</view>
width: 300upx; height: 100upx; background: linear-gradient(92deg, #5CE6B5, #0CA457);
box-shadow: 0upx 19upx 48upx 1upx rgba(20, 31, 62, 0.86); border-radius: 50upx;">
<view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
开始定制</view>
</view> </view>
</view> </view>
<!-- 错误提示信息 --> <!-- 错误提示信息 -->
...@@ -65,26 +60,17 @@ ...@@ -65,26 +60,17 @@
</view> </view>
<!-- 登录弹框 --> <!-- 登录弹框 -->
<Signin ref="Signin"></Signin> <Signin ref="Signin"></Signin>
<!-- 排队信息 -->
<!-- <view v-if="statusloading == 1" @tap="game"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>排队</view>
<view>信息</view>
</view>
</view> -->
<view v-if="statusloading == 1" @tap="toLineList" <view v-if="statusloading == 1" @tap="toLineList"
style="position: fixed; z-index: 99; right: 0; bottom: 318upx; width: 109upx; height: 123upx;"> style="position: fixed; z-index: 99; right: 0; bottom: 200upx; width: 109upx; height: 123upx;">
<image src="../../static/liebiao.png" mode="" style="width: 243upx; height: 123upx;"></image> <image src="../../static/liebiao.png" mode="" style="width: 243upx; height: 123upx;"></image>
</view> </view>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods> <!-- //商品弹框 --> <!--//商品弹框 -->
</view> </view>
</template> </template>
<script> <script>
...@@ -93,15 +79,13 @@ ...@@ -93,15 +79,13 @@
import FrImage from '@/components/fr-image/fr-image.vue' import FrImage from '@/components/fr-image/fr-image.vue'
import Signin from '../index/Signin.vue'; import Signin from '../index/Signin.vue';
import myhead from './head/head.vue'; import myhead from './head/head.vue';
/*import uniPopup from './/common/uni-popup/uni-popup.vue' */ import switchGoods from '../index/switchGoods.vue'; //选择商品
import switchGoods from '../index/switchGoods.vue'; // 手机壳
export default { export default {
components: { components: {
myhead, myhead,
Signin, Signin,
FrImage, FrImage,
switchGoods, switchGoods,
}, },
computed: {}, computed: {},
...@@ -117,6 +101,9 @@ ...@@ -117,6 +101,9 @@
worksid: 1, worksid: 1,
statusloading: null, //加载状态 statusloading: null, //加载状态
phone: '18938664545', phone: '18938664545',
goods: [], //商品列表
currentIndex: 0,
selectItem: null, //选择对象
}; };
}, },
...@@ -129,32 +116,28 @@ ...@@ -129,32 +116,28 @@
this.tologo() this.tologo()
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key url: '../mall/lineUp?machine_id='+this.machine_id+'&key=' + this.key
}) })
} }
}, },
//选择商品进来 //选择商品进来
selectGoodItem(item) { selectGoodItem(item) {
uni.navigateTo({ uni.navigateTo({
url: '../index/index?machine_id=' + this.machine_id + " &good_id=" + item.id, url: '../index/index?machine_id='+this.machine_id+"&good_id=" +item.id,
}) })
}, },
// 立即定制 //立即定制
Customize_now() { Customize_now() {
let that = this;
if (!this.$AppContext.checkLogin()) { if (!this.$AppContext.checkLogin()) {
this.tologo() this.tologo()
} else { } else {
this.$nextTick(() => { this.$refs['switchGoods'].open(this.machine_id);
this.$refs['switchGoods'].open({
});
})
} }
}, },
// 打电话 //打电话
tomakePhoneCall() { tomakePhoneCall() {
uni.showLoading({ uni.showLoading({
title: '跳转中...', title: '跳转中...',
...@@ -175,6 +158,8 @@ ...@@ -175,6 +158,8 @@
} }
}); });
}, },
//授权登录
tologo() { tologo() {
// 先登陆 // 先登陆
let that = this; let that = this;
...@@ -199,9 +184,13 @@ ...@@ -199,9 +184,13 @@
} }
}); });
}, },
//轮播图轮动
swiperChange(e) { swiperChange(e) {
this.currentSwiper = e.detail.current this.currentSwiper = e.detail.current
}, },
//获取商品明细
getDetail() { getDetail() {
uni.showLoading({ uni.showLoading({
title: '正在加载中...', title: '正在加载中...',
...@@ -209,7 +198,6 @@ ...@@ -209,7 +198,6 @@
}) })
homeservice.WorksList({ homeservice.WorksList({
machine_id: this.machine_id, machine_id: this.machine_id,
// s: 'machine.detail'
s: 'machine.newDetail' s: 'machine.newDetail'
}).then(res => { }).then(res => {
this.statusloading = 1; this.statusloading = 1;
...@@ -228,7 +216,9 @@ ...@@ -228,7 +216,9 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
Adlist() { // 轮播图
//获取轮播图
Adlist() {
homeservice.queryList({ homeservice.queryList({
s: 'Ad.list', s: 'Ad.list',
ad_position_key: 'currency_banner', ad_position_key: 'currency_banner',
...@@ -244,14 +234,23 @@ ...@@ -244,14 +234,23 @@
}); });
}); });
}, },
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i') //获取商品列表
var r = url.substr(1).match(reg) getGooods() {
if (r != null) { homeservice.queryList({
return r[2] s: 'Product.getCommonGoods', //新接口
} }).then(result => {
return null; this.goods = result;
} this.selectItem = this.goods[this.currentIndex];
//this.$refs['brandscenter'].open();
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
}, },
//上拉刷新 //上拉刷新
onReachBottom() {}, onReachBottom() {},
...@@ -273,14 +272,7 @@ ...@@ -273,14 +272,7 @@
}; };
return shareObj; return shareObj;
}, },
/* onShareTimeline() {
return {
title: this.$Env.getmalltext(),
path: '/pages/mall/machineDetail?machine_id=' + this.machine_id,
imageUrl:'',
query: 'kjbfrom=pyq'
}
}, */
onLoad(options) { onLoad(options) {
// console.log(options) // console.log(options)
//if(options.machine_id){ //if(options.machine_id){
...@@ -290,6 +282,7 @@ ...@@ -290,6 +282,7 @@
this.statusloading = 1; this.statusloading = 1;
//this.getDetail() //获取数据 //this.getDetail() //获取数据
this.Adlist() // 轮播图 this.Adlist() // 轮播图
this.getGooods()
// console.log("进来="+this.machine_id) // console.log("进来="+this.machine_id)
//} //}
/* if(options.worksid){ //控制导航返回 /* if(options.worksid){ //控制导航返回
...@@ -315,6 +308,10 @@ ...@@ -315,6 +308,10 @@
<style lang="scss"> <style lang="scss">
@import "../index/css/main.css"; @import "../index/css/main.css";
/* height: calc(100% - 400upx);
width: 100%;
position: absolute;
top: 200upx; */
page { page {
width: 100%; width: 100%;
...@@ -347,4 +344,37 @@ ...@@ -347,4 +344,37 @@
} }
} }
} }
.swiper-block {
height: calc(100% - 100upx);
width: 100%;
/* height: calc(100% - 300upx);
width: 100%;
position: absolute;
top: 150upx; */
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: calc(100% - 250upx);
width: 520upx;
border-radius: 20upx;
z-index: 1;
margin: 0upx 40upx;
background: #FFFFFF;
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}
</style> </style>
<template> <template>
<view> <view v-if="isShow" style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; " @click="closeView()">
<!-- 品牌 -->
<uni-popup ref="brandscenter" type="center" @change="change" :style="{height: (MobilePhoneHeight * 0.8) +'px'}"> <view
<view style="width: 690upx; margin:auto; display: flex; flex-direction: column;"> style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5; ">
<view :style="{height: (MobilePhoneHeight * 0.8) +'px'}"
style="width:100%; background: #FFFFFF; border-radius: 30upx; position: relative;">
<view @click="cancelBrand()" style="position: absolute; top: 0upx; right: 0upx;">
<image src="../../../static/icon_guanbi.png" mode=""
style="height: 23upx; width: 23upx; padding: 21upx 33upx;"></image>
</view>
<!-- <view style="margin:122upx auto 94upx;font-size: 36upx;text-align: center;">
请选择手机品牌
</view> -->
<view style="margin:62upx auto 50upx;font-size: 36upx; text-align: center;">
请选择商品
</view>
<scroll-view scroll-y scroll-with-animation
:style="{height: (MobilePhoneHeight * 0.8) - 200*pixelRate +'px'}" style="box-sizing: border-box;white-space: nowrap;
width: 510upx; margin:0 auto; overflow: hidden; margin-bottom: 50upx;">
<view v-for="(item,index) in goods" :key="index" @click="goodclick(item)">
<view style="float: left; margin: 10upx;
display: flex;align-items: center;
background: #EEEEEE;border-radius: 10upx;
height: 150upx; width: 150upx;" hover-class="brandactive" :class="[goodtext == item.name ? 'brandactive':'' ]">
<view style="width: 100%;">
<image :src="item.front_image"
style="width: 50%; height: 70upx; margin: auto; display: block;"></image>
<view style="text-align: center; font-size: 24upx; margin-top: 10upx; width: 95%; margin: auto;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;word-break:break-all;">
{{item.name || ''}}
</view>
</view>
</view> </view>
<view
style=" position: absolute;
top: calc(50% - 400upx);
height: 800upx;
width: 100%;
margin:auto;
display: flex;
flex-direction: column;
justify-content: center;
z-index: 999;">
<swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
circular='false' previous-margin='80rpx' next-margin='80rpx' :current="currentIndex"
@change="swiperChangeGood">
<swiper-item class="swiper-item" v-for="(item,index) in goods" :key="index" >
<view @click="goodclick(item)" :class="['slide-image', currentIndex === index?'active':'']" mode="aspectFill"
style="justify-content: center; align-items: center; ">
<image :src="item.front_image + '?x-oss-process=image/resize,lfit,w_450'"
style="width: 450upx; position: absolute;left: 50%;top:50%;transform: translate(-50%,-50%);"
mode="widthFix">
</image>
</view> </view>
</scroll-view> <view
<!-- 无数据 --> style="width: 100%;font-size: 28upx;color: #333333;text-align: center; position: absolute; bottom: 100upx; z-index: 999; ">
<view v-if="catrgoryList.length < 0" style="text-align: center; color: #BEBEBE;">该设备没有库存</view> {{item !=null ? item.name : ''}}
</view> </view>
</swiper-item>
</swiper>
</view> </view>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import homeservice from '@/service/homeservice.js'; import homeservice from '@/service/homeservice.js';
import uniPopup from '../index/common/uni-popup/uni-popup.vue';
import mpvuePicker from '@/components/mpvue-picker/mpvuePicker.vue';
var _self;
var canvaPie = null;
export default { export default {
props: {
// windowHeight: {
// type: Number,
// default: 1
// },
// pixelRate: {
// type: Number,
// default: 1
// },
},
components: {
uniPopup,
mpvuePicker
},
data() { data() {
return { return {
isShow: false, //是否显示
goodtext: '', //选择商品名称 goodtext: '', //选择商品名称
goods: [],
currentId: 0,
/* 控制被选中 */ /* 控制被选中 */
currentIndex: 0, currentIndex: 0,
/* 控制位置 */ /* 控制位置 */
...@@ -76,40 +51,49 @@ ...@@ -76,40 +51,49 @@
queryPage: { queryPage: {
s: 'Material.list', s: 'Material.list',
}, },
goods: [], //商品列表
machine_id:null, //机器码
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
//关闭视图
closeView() {
this.isShow = false;
},
//商品列表滚
swiperChangeGood(event) {
this.currentIndex = event.detail.current
},
//商品点击事件 //商品点击事件
goodclick(e) { goodclick(e) {
this.isShow = false;
this.goodtext = e.name //选择商品名 this.goodtext = e.name //选择商品名
this.$refs['brandscenter'].close(); this.$emit('selectGoodItem',{
this.$emit('selectGoodItem', {
id: e.id, id: e.id,
name: e.name, //手机壳信息
}) })
}, },
//打开页面 //打开页面
open() { open(machineId) {
this.machine_id = machineId;
this.getGooods(); this.getGooods();
//this.$refs['brandscenter'].open();
}, },
//获取商品列表 //获取商品列表
getGooods() { getGooods() {
let that = this;
homeservice.queryList({ homeservice.queryList({
s: 'Product.getCommonGoods', //新接口 s: 'Product.getCommonGoods', //新接口
}).then(result => { }).then(result => {
this.goods = result; this.goods = result;
this.$refs['brandscenter'].open(); this.isShow = true;
}).catch(err => { }).catch(err => {
this.isShow = false;
uni.showToast({ uni.showToast({
title: err.msg, title: err.msg,
icon: 'none' icon: 'none'
...@@ -117,177 +101,70 @@ ...@@ -117,177 +101,70 @@
}); });
}, },
change(e) {}, change(e) {
}, },
onShow(options) {}, },
}
</script>
<style lang="scss">
.classification {
width: 300upx;
height: 80upx;
line-height: 80upx;
text-align: center;
background: #EEEEEE;
border-radius: 0 0 40upx 0;
font-size: 36upx;
color: #666666;
&.active {
background: #864BC3 !important;
color: #FFFFFF !important;
}
}
// 分类
.scroll-container {
box-sizing: border-box;
white-space: nowrap;
width: 540upx;
margin: auto;
.scroll-item {
width: 152upx;
height: 248upx;
background: #F5F5F5;
border-radius: 20upx;
text-align: center;
display: inline-block;
margin: 0 10upx;
border: 4upx solid #F5F5F5;
&.active {
background: #FFFFFF !important;
border: 4upx solid #864BC3;
}
// &.active::before { onShow(options) {
// content: '...'; getGooods();
// position: absolute;
// left: calc(50% - 10px);
// top: 100%;
// width: 20px;
// margin-left: 0px;
// margin-top: -5px;
// border-top: 4px dotted #595959;
// }
}
}
.experiencebutton { },
width: 230upx;
height: 70upx;
line-height: 70upx;
text-align: center;
color: #FFFFFF;
margin: 40upx auto 0;
border-radius: 35upx;
background: linear-gradient(to right, #834DC4, #1983D7);
font-size: 26upx;
}
.canbutton {
color: #FFFFFF;
font-size: 26upx;
width: 218upx;
height: 58upx;
line-height: 58upx;
border: 1px transparent solid;
border-radius: 30px;
position: relative;
margin: auto;
background: #292933;
text-align: center;
} }
</script>
.canbutton:after { <style lang="scss">
content: ''; .swiper-block {
height: 100%;
width: 100%;
/* height: calc(100% - 300upx);
width: 100%;
position: absolute; position: absolute;
top: -3px; top: 150upx; */
bottom: -3px;
left: -3px;
right: -3px;
background: linear-gradient(to right, #834DC4, #1983D7);
border-radius: 30px;
content: '';
z-index: -1;
} }
// 品牌 .swiper-item {
.brandactive { display: flex;
background: #E4D0F6 !important; flex-direction: column;
} justify-content: center;
align-items: flex-start;
overflow: unset;
.backgroundColoractive {
border: 2upx #834DC4 solid !important;
} }
.tooltiptext { .slide-image {
visibility: hidden; height: calc(100% - 100upx);
min-width: 120upx; width: 520upx;
background-color: black; border-radius: 20upx;
color: #fff;
text-align: center;
border-radius: 6upx;
padding: 5upx 0;
font-size: 20upx;
/* 定位 */
position: fixed;
z-index: 1; z-index: 1;
margin: 0upx 40upx;
background: url("../../static/item_good_frame.png")
} }
.tooltiptextactive { .active {
visibility: visible; transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
} }
// 型号
.model {
padding: 0upx 20upx;
height: 60upx;
line-height: 60upx;
background: #141319;
text-align: center;
color: #FFFFFF;
border-radius: 30upx;
margin-right: 20upx;
font-size: 28upx;
}
.modelactive {
color: #553177 !important;
}
.determineBut { /* .classification {
background: linear-gradient(92deg, #178CE6, #984ACE); width: 300upx;
color: #FFFFFF; height: 80upx;
position: fixed; line-height: 80upx;
bottom: 110upx;
text-align: center; text-align: center;
left: 0; background: #EEEEEE;
right: 0; border-radius: 0 0 40upx 0;
width: 251upx; font-size: 36upx;
height: 77upx; color: #666666;
line-height: 77upx;
border-radius: 38upx;
font-size: 31upx;
margin: auto;
}
.determineButtn { &.active {
width: 251upx; background: #864BC3 !important;
margin: 34upx auto 0; color: #FFFFFF !important;
height: 77upx;
line-height: 77upx;
text-align: center;
background: linear-gradient(92deg, #178CE6, #984ACE);
opacity: 0.86;
border-radius: 38upx;
font-size: 31upx;
font-weight: 500;
color: #FFFFFF;
} }
} */
// 分类
</style> </style>
<template> <template>
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 999;"> <view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;">
<view class="head" :style="{ height: height + 'px', background:background}"> <view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }"> <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" <image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image> style="width: 32upx; height: 32upx; 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>
</view> </view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view> <view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
</view> </view>
...@@ -14,10 +13,6 @@ ...@@ -14,10 +13,6 @@
<script> <script>
export default { export default {
props: { props: {
worksid:{
type: Number,
default: null
},
title: { title: {
type: String, type: String,
default: '自定义标题' default: '自定义标题'
...@@ -53,7 +48,6 @@ ...@@ -53,7 +48,6 @@
}, },
created() { created() {
// console.log('设备信息')
//设备信息 //设备信息
let app = uni.getSystemInfoSync(); let app = uni.getSystemInfoSync();
//胶囊信息 //胶囊信息
...@@ -63,12 +57,8 @@ ...@@ -63,12 +57,8 @@
}, },
methods: { methods: {
back(){ back(){
if(this.worksid > 0){
uni.redirectTo({ url: '../index/mall' })
}else{
uni.navigateBack(); uni.navigateBack();
} }
}
}, },
onLoad(options) { onLoad(options) {
......
static/icon_make_diy_back_color.png

1.14 KB | W: | H:

static/icon_make_diy_back_color.png

2.47 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
...@@ -13,12 +13,12 @@ const baseApi = { ...@@ -13,12 +13,12 @@ const baseApi = {
release: "https://tprint.colorpark.cn", release: "https://tprint.colorpark.cn",
}; };
const baseURL = baseApi[accountInfo.miniProgram.envVersion] const baseURL = baseApi[accountInfo.miniProgram.envVersion]
console.log(accountInfo.miniProgram.envVersion) //console.log(accountInfo.miniProgram.envVersion)
// console.log(baseURL) //console.log(baseURL)
const Env = { const Env = {
getDevBaseURL: () => baseURL, getDevBaseURL: () => baseURL,
getBaseURL: () => baseURL, getBaseURL: () => baseURL,
getmachineId: () => '100054', //线上100086 //测试 422001' //100086 getmachineId: () => '100055', //线上100086 //测试 422001' //100086
getappcode: () => 'lite', getappcode: () => 'lite',
getmalltext: () => "色彩公园Lite", getmalltext: () => "色彩公园Lite",
getAppID: () => "wx1c777ee874c39b0b", getAppID: () => "wx1c777ee874c39b0b",
......
// const baseUrl = 'https://ws.refinecolor.com'; import Env from '@/util/Env.js'
const baseUrl = 'https://tprint.refinecolor.com';
import store from '../store' import store from '../store'
const baseUrl = Env.getBaseURL();
const http = ({ url = '', param = {}, ...other } = {}) => { const http = ({ url = '', param = {}, ...other } = {}) => {
wx.showLoading({ // wx.showLoading({
title: '啊嘞,色彩正在绘制' // title: '啊嘞,色彩正在绘制'
}); // });
let timeStart = Date.now(); let timeStart = Date.now();
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.request({ wx.request({
url: getUrl(url), url: getUrl(url),
...@@ -20,7 +19,6 @@ const http = ({ url = '', param = {}, ...other } = {}) => { ...@@ -20,7 +19,6 @@ const http = ({ url = '', param = {}, ...other } = {}) => {
complete(res) { complete(res) {
wx.hideLoading(); wx.hideLoading();
console.log(`耗时${Date.now()} - timeStart`); console.log(`耗时${Date.now()} - timeStart`);
if(res.statusCode >= 200 && res.statusCode < 300){ if(res.statusCode >= 200 && res.statusCode < 300){
resolve(res.data); resolve(res.data);
}else{ }else{
...@@ -76,3 +74,13 @@ module.exports = { ...@@ -76,3 +74,13 @@ module.exports = {
put, put,
del del
} }
// http.get('https://ccdcapi.alipay.com/validateAndCacheCardInfo.json',{
// _input_charset:'utf-8',
// cardNo:'6227003320240034988',
// cardBinCheck:true
// }).then(result => {
// console.log(result.bank)
// }).catch(err => {
// uni.showToast({ title: err.msg, icon: 'none' });
// })
\ No newline at end of file
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