Merge branch 'feature-releaseGoods' into pre-release

# Conflicts:
#	config/app.js
#	manifest.json
#	pages.json
#	pages/chat/customer_list/index.vue
#	pages/index/index.vue
#	pages/product/addGood/addGood.vue
#	pages/product/basicSet.vue
#	pages/product/list/index.vue
#	pages/users/gather_list/index.vue
#	pages/withdrawal/index.vue
#	pages/withdrawal/progress.vue
#	uni_modules/h-datetime-picker/components/h-datetime-picker/h-datetime-picker.vue
#	utils/util.js
This commit is contained in:
luofei 2024-05-14 17:59:48 +08:00
commit a6c5f9581a
65 changed files with 12365 additions and 5336 deletions

31
App.vue
View File

@ -1,6 +1,6 @@
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
@ -16,7 +16,9 @@
checkLogin
} from "./libs/login";
import {
getUserInfo
} from '@/api/user.js';
import {
parseToken
@ -65,7 +67,6 @@
auto_arrival: 0,
mer_location: 0,
statusBarHeight: 0,
mer_location: 0,
store_street_theme: 1,
sys_intention_agree: '',
copyright_status: '',
@ -89,6 +90,21 @@
//
console.log('消息成功' + JSON.stringify(option));
});
uni.onHostEventReceive((event, data) => {
if (event == 'tocustomlist') {
if (data.page_type == 1) {
uni.switchTab({
url: data.route
});
} else {
uni.navigateTo({
url: data.route
})
}
}
});
// #endif
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
@ -120,6 +136,10 @@
if (option?.referrerInfo?.extraData?.uniMP) {
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.token,
// 'time': 604800
// });
parseToken({
token: option.referrerInfo?.extraData?.token
}).then((res) => {
@ -133,6 +153,7 @@
'token': option.referrerInfo?.extraData?.token,
'time': 604800
});
console.log('TOKEN解析错误:', err);
this.$isResolve()
})
} else {
@ -436,12 +457,6 @@
box-sizing: border-box;
}
.c_active {
&:active {
opacity: .8;
}
}
.custom_style {
color: #fff;
display: flex;

34
api/common.js Normal file
View File

@ -0,0 +1,34 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 获取省份
*/
export function getProvince() {
return request.get("city/get_province");
}
/**
* 获取省份
*/
export function getCity(data) {
return request.get("city/get_city", data);
}
/**
* 获取省份
*/
export function getArea(data) {
return request.get("city/get_area", data);
}

View File

@ -147,6 +147,35 @@ export function categoryList(merId) {
})
}
/*
添加修改商品 搜索上平
*/
export function categorySearch(merId, data) {
return request.get(`server/${merId}/category/search`, data, {
login: true
})
}
/*
添加修改商品 热门分类商品
*/
export function categorySearchHistory(merId, uid, data) {
return request.post(`server/${merId}/category/search_history/${uid}`, data, {
login: true
})
}
/*
添加修改商品 添加热门分类商品
*/
export function categoryHotcate(merId, uid) {
return request.get(`server/${merId}/category/hotcate/${uid}`, {
login: true
})
}
/*
商品管理 添加商品
*/

View File

@ -19,7 +19,13 @@ export function errorReport(data) {
return request.post(`api/err/report`, data);
}
/**
* 新商户
*/
export function isNewMer(uid, mer_id, data) {
return request.post(`auth/guide/${uid}/${mer_id}`, data);
}
/**
/**
* 提现----查询单条信息
*/

View File

@ -19,9 +19,9 @@
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags">
<text v-if="item.product_type == 0 && item.merchant.type_name"
class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.product_type == 0 && item.merchant.is_trader"
@ -44,8 +44,9 @@
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class="score"><span
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view>
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;">
<view class='money'>
<span style="font-size:30rpx;"></span>
@ -59,14 +60,14 @@
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price"
class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
<view class="item_tags acea-row">
<text v-if="item.merchant.type_name && item.product_type == 0"
class="font-bg-red b-color">{{item.merchant.type_name}}</text>
<text v-else-if="item.merchant.is_trader && item.product_type == 0"
@ -76,7 +77,7 @@
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view>
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">

View File

@ -82,9 +82,8 @@
.item-info {}
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;
@ -110,7 +109,6 @@
border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 1px solid #3274F9;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-right: 15rpx;
}
@ -125,7 +123,6 @@
border-radius: 11rpx 0px 0px 0rpx;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
@ -136,7 +133,6 @@
border-radius: 0px 11rpx 11rpx 0px;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
}
@ -161,7 +157,6 @@
.relase-two {
font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #B3B3B3;
margin-left: 13rpx;
@ -201,7 +196,6 @@
opacity: 1;
font-size: 23rpx;
padding-left: 11rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;

View File

@ -64,8 +64,8 @@
width: 100% !important;
height: 345rpx;
image{
width: 100% ;
image {
width: 100%;
height: 345rpx;
}
}
@ -94,7 +94,6 @@
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;

View File

@ -19,7 +19,7 @@
<image src="/static/images/svip.png"></image>
</view>
</view>
<!-- <view class="item_tags">
<text v-if="item.product_type == 0 && item.merchant.type_name"
@ -44,8 +44,9 @@
<view class='text'>
<view class='name line2'>{{item.store_name}}</view>
<view class="score"><span
style="font-size: 23rpx;font-family: PingFang SC-Semibold, PingFang SC;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论</view>
style="font-size: 23rpx;font-weight: 600;color: #F84221;margin-right: 28rpx;">{{item.rate}}</span>
{{item.reply_count}}条评论
</view>
<view class="" style="display: flex;justify-content: space-between;">
<view class='money'>
<span style="font-size:30rpx;"></span>
@ -59,7 +60,7 @@
<view v-if="item.show_svip_info.show_svip && item.show_svip_info.show_svip_price"
class="acea-row row-middle svip">
<text class='vip-money'>{{item.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
@ -76,7 +77,7 @@
<text class="tags_item ticket" v-if="item.issetCoupon">领券</text>
<text class="tags_item delivery" v-if="item.delivery_free == 1">包邮</text>
</view> -->
<view class="company" v-if="item.merchant" @click.stop="goShop(item.merchant.mer_id)">
<text class="line1">{{item.merchant.mer_name}}</text>
<view class="flex" v-if="isStore != '1'">

View File

@ -82,9 +82,8 @@
.item-info {}
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;
@ -110,7 +109,6 @@
border-radius: 11rpx 11rpx 11rpx 11rpx;
border: 1px solid #3274F9;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-right: 15rpx;
}
@ -125,7 +123,6 @@
border-radius: 11rpx 0px 0px 0rpx;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
@ -136,7 +133,6 @@
border-radius: 0px 11rpx 11rpx 0px;
border: 1px solid #F84221;
font-size: 19rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
}
@ -161,7 +157,6 @@
.relase-two {
font-size: 23rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #B3B3B3;
margin-left: 13rpx;
@ -201,7 +196,6 @@
opacity: 1;
font-size: 23rpx;
padding-left: 11rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #737373;

View File

@ -64,8 +64,8 @@
width: 100% !important;
height: 345rpx;
image{
width: 100% ;
image {
width: 100%;
height: 345rpx;
}
}
@ -94,7 +94,6 @@
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;

BIN
components/aaa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -55,8 +55,6 @@
font-size: 30rpx;
font-family: PingFang SC-Regular,
PingFang SC;
font-weight: 400;
color: #333333;
}

View File

@ -38,7 +38,9 @@
// #ifdef H5
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
// #endif
import { mapGetters } from "vuex";
import {
mapGetters
} from "vuex";
export default {
props: {
isCopy: {
@ -56,22 +58,22 @@
title: '复制以下口令'
};
},
mounted(){
mounted() {
let that = this
// #ifdef H5
that.$nextTick(function() {
var clipboard = new ClipboardJS('.copy-data');
clipboard.on('success', function(e) {
that.$util.Tips({
title:'复制成功'
title: '复制成功'
})
setTimeout(()=>{
setTimeout(() => {
that.$emit('close');
},500)
}, 500)
});
clipboard.on('error', function(e) {
that.$util.Tips({
title:'复制失败'
title: '复制失败'
})
});
});
@ -79,16 +81,18 @@
},
methods: {
//#ifndef H5
copyText:function(){
copyText: function() {
let that = this;
uni.setClipboardData({ data: this.copyUrl });
setTimeout(()=>{
uni.setClipboardData({
data: this.copyUrl
});
setTimeout(() => {
that.$emit('close');
},500)
}, 500)
},
// #endif
close: function(){
this.$emit('close');
close: function() {
this.$emit('close');
}
}
}
@ -106,13 +110,15 @@
transform: translate3d(0, 100%, 0);
transition: all .1s cubic-bezier(.25, .5, .5, .9);
padding: 50rpx 30rpx 30rpx;
.icon-guanbi{
.icon-guanbi {
position: absolute;
top: 20rpx;
right: 20rpx;
color: #8A8A8A;
}
.button{
.button {
height: 76rpx;
border-radius: 38rpx;
margin: 30rpx 30rpx 0;
@ -120,28 +126,31 @@
font-size: 30rpx;
line-height: 76rpx;
color: #FFFFFF;
}
}
}
.copy-list-window.on {
transform: translate3d(0, 0, 0);
}
.copy-list-window .title {
width: 100%;
text-align: center;
font-size: 32rpx;
font-weight: bold;
font-family: 'PingFang SC';
.iconfont {
font-size: 30rpx;
color: #FBB324;
margin-right: 12rpx;
}
}
.copy-url{
.copy-url {
margin-top: 30rpx;
background: #F5F5F5;
padding: 20rpx 25rpx;
color: #BBBBBB;
font-size: 28rpx;
}
</style>
</style>

View File

@ -78,7 +78,6 @@
padding-right: 0rpx;
scroll-behavior: smooth; //
font-size: 32rpx;
font-family: PingFang-SC-Heavy;
.my-tab-item {
padding: 20rpx 35rpx; // --
@ -89,7 +88,6 @@
&.active {
color: #333333; // --
font-family: PingFang-SC-Heavy;
font-weight: 600;
position: relative;
@ -110,7 +108,6 @@
position: relative;
z-index: 9;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #F84221;
color: #F84221;

View File

@ -1,13 +1,14 @@
<template>
<view class='product-bg'>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay" :circular="circular"
:interval="interval" :duration="duration" @change="change" v-if="isPlay">
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
:circular="circular" :interval="interval" :duration="duration" @change="change" v-if="isPlay">
<!-- #ifndef APP-PLUS -->
<swiper-item v-if="videoline && videoline != '' && videoline != 'https:'">
<view class="item">
<video id="myVideo" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)'
objectFit="cover" controls style="width:100%;height:100% " show-mute-btn="true"
auto-pause-if-navigate @ended="endedFun()"></video>
<video id="myVideo"
:src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : ("http:" + videoline)'
objectFit="cover" controls style="width:100%;height:100% " show-mute-btn="true"
auto-pause-if-navigate @ended="endedFun()"></video>
<view class="poster" v-if="controls">
<image class="image" :src="videoCoverImg"></image>
</view>
@ -37,9 +38,11 @@
</swiper>
<!-- #ifdef APP-PLUS -->
<view v-if="!isPlay" style="width: 100%; height: 750rpx;">
<video id="myVideo" :src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : "http:" + videoline'
objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true"
auto-pause-if-navigate :enable-progress-gesture="false" :poster="videoCoverImg" @pause="videoPause" @ended="endedFun()"></video>
<video id="myVideo"
:src='videoline && (videoline.substring(0,4) == "http" || videoline.substring(0,5) == "https") ? videoline : "http:" + videoline'
objectFit="cover" controls style="width:100%;height:100% " show-center-play-btn show-mute-btn="true"
auto-pause-if-navigate :enable-progress-gesture="false" :poster="videoCoverImg" @pause="videoPause"
@ended="endedFun()"></video>
</view>
<!-- #endif -->
@ -119,7 +122,7 @@
// #ifdef APP-PLUS
this.isPlay = false
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(()=>{
this.$nextTick(() => {
this.videoContext.play();
})
// #endif
@ -140,15 +143,18 @@
height: 750rpx;
position: relative;
}
.product-bg swiper {
width: 100%;
height: 100%;
position: relative;
}
.product-bg .slide-image {
width: 100%;
height: 100%;
}
.product-bg .pages {
position: absolute;
background-color: #fff;
@ -161,15 +167,18 @@
font-size: 24rpx;
color: #050505;
}
#myVideo {
width: 100%;
height: 100%
}
.product-bg .item {
position: relative;
width: 100%;
height: 100%;
}
.product-bg .item .poster {
position: absolute;
top: 0;
@ -178,10 +187,12 @@
width: 100%;
z-index: 9;
}
.product-bg .item .poster .image {
width: 100%;
height: 100%;
}
.product-bg .item .stop {
position: absolute;
top: 50%;
@ -192,8 +203,9 @@
margin-left: -68rpx;
z-index: 9;
}
.product-bg .item .stop .image {
width: 100%;
height: 100%;
}
</style>
</style>

View File

@ -0,0 +1,239 @@
<template>
<view class='product-bg'>
<swiper :indicator-dots="indicatorDots" :current='current' indicator-active-color="#e93323" :autoplay="autoplay"
:circular="circular" :interval="interval" :duration="duration" @change="change" v-if="isPlay">
<!-- #ifndef APP-PLUS -->
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item v-if="isVideoUrl(item)">
<video :src="isVideoUrl(item,true)" objectFit="cover" controls style="width:100%;height:100% "
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate
:enable-progress-gesture="false" :poster="item+coverUrl"></video>
</swiper-item>
<swiper-item v-else>
<image :src="item" class="slide-image" @click='getpreviewImage(item)' />
</swiper-item>
</block>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item v-if="isVideoUrl(item)">
<view>
<image :src="item+coverUrl" class="slide-image" />
<image class="image-play-icon" src="../../static/images/stop.png"
@click='videoPlay(item,index)'>
</image>
</view>
</swiper-item>
<swiper-item v-else>
<image :src="item" class="slide-image" @click='getpreviewImage(item)' />
</swiper-item>
</block>
<!-- #endif -->
</swiper>
<!-- #ifdef APP-PLUS -->
<view v-if="!isPlay" style="width: 100%; height: 750rpx;">
<video id="myVideo" :src='playingUrl' objectFit="cover" controls style="width:100%;height:100% "
show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :enable-progress-gesture="false"
:poster="playingUrl+coverUrl" @pause="videoPause" @ended="endedFun()"></video>
</view>
<!-- #endif -->
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
export default {
props: {
imgUrls: {
type: Array,
default: function() {
return [];
}
},
videoline: {
type: String,
value: ""
},
videoCoverImg: {
type: String,
}
},
data() {
return {
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
current: '0',
videoTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
playingUrl: '',
indicatorDots: true,
circular: true,
autoplay: true,
interval: 5000,
duration: 500,
currents: "1",
controls: true,
isPlay: true,
videoContext: ''
};
},
created() {
},
watch: {
},
mounted() {
// #ifndef APP-PLUS
this.videoContext = uni.createVideoContext('myVideo', this);
// #endif
},
methods: {
isVideoUrl(url, getRightUrl) {
const str = url;
const lastIndex = str.lastIndexOf(".");
let extension;
if (lastIndex !== -1) {
extension = str.substring(lastIndex + 1);
} else {
extension = 'jpg'
}
if (getRightUrl) return url.replace(/\\/g, "")
return this.videoTypeList.includes(extension)
},
videoPlay(url, index) {
this.playingUrl = url
this.current = index
console.log(this.current)
this.bindPause()
},
getpreviewImage: function(item) {
uni.previewImage({
urls: this.imgUrls,
current: item
});
},
videoPause(e) {
// #ifdef APP-PLUS
this.isPlay = true
this.autoplay = true
// #endif
},
bindPause: function() {
// #ifndef APP-PLUS
this.videoContext.play();
this.$set(this, 'controls', false)
this.autoplay = false
// #endif
// #ifdef APP-PLUS
this.isPlay = false
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
// #endif
},
change: function(e) {
this.$set(this, 'currents', e.detail.current + 1);
},
endedFun() {
this.controls = true
}
}
}
</script>
<style scoped lang="scss">
.product-bg {
width: 100%;
height: 750rpx;
position: relative;
}
.product-bg swiper {
width: 100%;
height: 100%;
position: relative;
}
.product-bg .slide-image {
width: 750rpx;
height: 750rpx;
}
.product-bg .pages {
position: absolute;
background-color: #fff;
height: 34rpx;
padding: 0 10rpx;
border-radius: 3rpx;
right: 30rpx;
bottom: 30rpx;
line-height: 34rpx;
font-size: 24rpx;
color: #050505;
}
#myVideo {
width: 100%;
height: 100%
}
.product-bg .item {
position: relative;
width: 100%;
height: 100%;
}
.product-bg .item .poster {
position: absolute;
top: 0;
left: 0;
height: 750rpx;
width: 100%;
z-index: 9;
}
.product-bg .item .poster .image {
width: 100%;
height: 100%;
}
.product-bg .item .stop {
position: absolute;
top: 50%;
left: 50%;
width: 136rpx;
height: 136rpx;
margin-top: -68rpx;
margin-left: -68rpx;
z-index: 9;
}
.product-bg .item .stop .image {
width: 100%;
height: 100%;
}
.image-play-icon {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>

View File

@ -0,0 +1,466 @@
<template>
<view :style="viewColor">
<view class="product-window"
:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt || destri?'join':'') + ' ' + (isPresell ?'presell-window':'product-window')">
<view class="textpic acea-row row-between-wrapper">
<view class="pictrue">
<image :src="attr.productSelect.image ? attr.productSelect.image : image" @click="loookImg"></image>
</view>
<view class="text">
<view class="line1">
{{ attr.productSelect.store_name }}
</view>
<view v-if="isPresell" class="money presell_price">
<view>
预售价
<text class="num">{{ attr.productSelect.price }}</text>
<text v-if="presell_type === 2">定金<text
class="num">{{ attr.productSelect.down_price }}</text></text>
</view>
<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
</view>
<view v-else class="money">
<view class="acea-row row-middle">
<view class="acea-row row-middle">
<text></text><text class="num">{{ attr.productSelect.price }}</text>
<view v-if="svipPrice" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text>
<view class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
</view>
</view>
</view>
<view class="stock_count">
<text class="stock" v-if='isShow'>库12存: {{ attr.productSelect.stock }}</text>
<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota_show}}</text>
</view>
</view>
</view>
<view class="iconfont icon-guanbi" @click="closeAttr"></view>
</view>
<view class="productWinList">
<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
<view class="title">{{ item.attr_name }}</view>
<view class="listn acea-row row-middle">
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)" :key="indexn">
{{ itemn.attr }}
</view>
</view>
</view>
</view>
<view class="cart acea-row">
<view class="title">数量</view>
<view class="carnum acea-row row-left">
<view class="buy_limit" v-if="minCount>0 || maxCount>0">
(<text v-if="minCount>0">{{minCount}}件起购<text
v-if="minCount>0 && maxCount>0"></text></text><text
v-if="maxCount>0">最多{{maxCount}}</text>)
</view>
<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes">
-
</view>
<view class='item num'>
<input type="number" v-model="attr.productSelect.cart_num" data-name="productSelect.cart_num"
@input="bindCode(attr.productSelect.cart_num)" @keydown="btKeyDown"
@keyup="btKeyUp"></input>
</view>
<view v-if="iSplus" class="item plus"
:class=" attr.productSelect.cart_num >= attr.productSelect.stock || destri ? 'on' : ''"
@click="CartNumAdd">+</view>
<view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.quota_show)
|| (attr.productSelect.cart_num >= attr.productSelect.product_stock)? "on":""' @click='CartNumAdd'>+
</view>
</view>
</view>
<view class="joinBnt b-color" v-if="destri && attr.productSelect.stock>0" @click="goCat">立即购买</view>
<view class="joinBnt on" v-else-if="destri && attr.productSelect.stock<=0">已售罄</view>
<view class="joinBnt b-color" v-if="iSbnt && attr.productSelect.stock>0" @click="goCat">我要参团</view>
<view class="joinBnt on" v-else-if="(iSbnt && attr.productSelect.stock<=0)">已售罄</view>
</view>
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
</view>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
mapGetters
} from "vuex";
export default {
props: {
attr: {
type: Object,
default: () => {}
},
limitNum: {
type: Number,
value: 0
},
isShow: {
type: Number,
value: 0
},
iSbnt: {
type: Number,
value: 0
},
iSplus: {
type: Number,
value: 0
},
destri: {
type: Number,
value: 0
},
isPresell: {
type: Number,
value: 0
},
presell_type: {
type: Number,
value: 1
},
image: {
type: String,
value: ''
},
maxCount: {
type: Number,
value: 0
},
minCount: {
type: Number,
value: 0
},
svipPrice: {
type: Boolean,
value: false
}
},
computed: mapGetters(['viewColor']),
data() {
return {};
},
mounted() {
console.log(this.attr, 'attr')
},
methods: {
//
loookImg() {
let self = this
let arr = [self.attr.productSelect.image ? self.attr.productSelect.image : self.image]
uni.previewImage({
urls: arr,
});
},
goCat: function() {
this.$emit('goCat');
},
/**
* 购物车手动输入数量
*
*/
bindCode: function(e) {
let num = JSON.parse(JSON.stringify(e))
this.$emit('iptCartNum', num);
},
btKeyDown(e) {
e.target.value = e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, "");
},
btKeyUp(e) {
e.target.value = e.target.value.replace(
/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, "")
},
closeAttr: function() {
this.$emit('myevent');
},
CartNumDes: function() {
if (!this.destri) {
this.$emit('ChangeCartNum', false);
}
},
CartNumAdd: function() {
if (!this.destri) {
this.$emit('ChangeCartNum', true);
}
},
tapAttr: function(indexw, indexn) {
let that = this;
that.$emit("attrVal", {
indexw: indexw,
indexn: indexn
});
this.$set(this.attr.productAttr[indexw], 'index', this.attr.productAttr[indexw].attr_values[indexn]);
let value = that.getCheckedValue().join(",");
that.$emit("ChangeAttr", value);
},
//
getCheckedValue: function() {
let productAttr = this.attr.productAttr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
for (let j = 0; j < productAttr[i].attr_values.length; j++) {
if (productAttr[i].index === productAttr[i].attr_values[j]) {
value.push(productAttr[i].attr_values[j]);
}
}
}
return value;
}
}
}
</script>
<style scoped lang="scss">
.product-window {
position: fixed;
bottom: 0;
width: 100%;
left: 0;
background-color: #fff;
z-index: 77;
border-radius: 16rpx 16rpx 0 0;
padding-bottom: 140rpx;
padding-bottom: calc(140rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
&.presell-window {
padding-bottom: 200rpx;
}
}
.product-window.on {
transform: translate3d(0, 0, 0);
}
.product-window.join {
padding-bottom: 30rpx;
}
.product-window .textpic {
padding: 0 80rpx 0 30rpx;
margin-top: 29rpx;
position: relative;
}
.product-window .textpic .pictrue {
width: 150rpx;
height: 150rpx;
}
.product-window .textpic .pictrue image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
.product-window .textpic .text {
width: 460rpx;
font-size: 32rpx;
color: #202020;
}
.product-window .textpic .text .money {
font-size: 24rpx;
margin-top: 26rpx;
font-weight: 700;
color: var(--view-priceColor);
}
.product-window .stock_count {
margin-top: 5rpx;
}
.product-window .textpic .text .money .num {
font-size: 36rpx;
}
.product-window .textpic .text .money .stock {
color: #999;
margin-left: 18rpx;
font-weight: normal;
}
.product-window .textpic .text .presell_price {
color: #FF7F00;
.num {
display: inline-block;
margin-right: 20rpx;
}
.stock {
margin-left: 0;
}
}
.vip-money {
color: #282828;
font-size: 22rpx;
margin-left: 6rpx;
}
.vipImg {
width: 65rpx;
height: 28rpx;
margin-left: 4rpx;
image {
width: 100%;
height: 100%;
display: block;
}
}
.product-window .textpic .iconfont {
position: absolute;
right: 30rpx;
top: -5rpx;
font-size: 35rpx;
color: #8a8a8a;
}
.product-window .productWinList {
max-height: 395rpx;
overflow: auto;
margin-top: 36rpx;
}
.product-window .productWinList .item~.item {
margin-top: 36rpx;
}
.product-window .productWinList .item .title {
font-size: 30rpx;
color: #999;
padding: 0 30rpx;
}
.product-window .productWinList .item .listn {
padding: 0 30rpx 0 16rpx;
}
.product-window .productWinList .item .listn .itemn {
border: 1px solid #bbb;
font-size: 26rpx;
color: #282828;
padding: 7rpx 33rpx;
border-radius: 6rpx;
margin: 14rpx 0 0 14rpx;
}
.product-window .productWinList .item .listn .itemn.on {
color: #fff;
background-color: var(--view-theme);
border-color: var(--view-theme);
}
.product-window .cart {
margin-top: 36rpx;
padding: 0 30rpx;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
}
.product-window .cart .title {
font-size: 30rpx;
color: #999;
line-height: 54rpx;
}
.product-window .cart .carnum {
height: 54rpx;
align-items: center;
}
.product-window .cart .carnum .buy_limit {
font-size: 22rpx;
color: var(--view-theme);
margin-right: 30rpx;
}
.product-window .cart .carnum .item {
width: 63rpx;
text-align: center;
height: 100%;
line-height: 42rpx;
color: #333333;
font-weight: 400;
font-size: 26rpx;
}
.product-window .cart .carnum .reduce {
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx;
}
.product-window .cart .carnum .reduce.on {
border-color: #e3e3e3;
color: #dedede;
}
.product-window .cart .carnum .plus {
border: 1px solid #a4a4a4;
width: 44rpx;
height: 42rpx;
// border-right: 0;
border-radius: 0 7rpx 7rpx 0;
line-height: 30rpx
}
.product-window .cart .carnum .plus.on {
border-color: #e3e3e3;
color: #dedede;
}
.product-window .cart .carnum .num {
color: #282828;
font-size: 28rpx;
}
.product-window .joinBnt {
font-size: 30rpx;
width: 620rpx;
height: 86rpx;
border-radius: 50rpx;
text-align: center;
line-height: 86rpx;
color: #fff;
margin: 21rpx auto 0 auto;
&.b-color {
background-color: var(--view-theme);
}
}
.product-window .joinBnt.on {
background-color: #bbb;
color: #fff;
}
</style>

View File

@ -159,23 +159,23 @@
checkedObj: {
handler(n) {
this.checkedArr = JSON.parse(JSON.stringify(n||{}))
this.checkedArr = JSON.parse(JSON.stringify(n || {}))
},
deep: true
}
},
mounted() {
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj||{}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj||{}))
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.getBounht();
},
methods: {
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
// , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id);
obj ? obj.price = e.detail.value:null;
// , ,
let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.price = e.detail.value : null;
// this.$set(item, 'check', false);
// for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) {
@ -216,9 +216,9 @@
numberChange(data, i) {
this.peicenumber = data.number;
this.bought[i].number = data.number;
// , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id);
obj ? obj.number = data.number:null;
// , ,
let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.number = data.number : null;
},
tabs(index) {
@ -289,7 +289,7 @@
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
that.peicenumber = val.number
}
})
})
@ -344,7 +344,7 @@
},
/*确定提交*/
submit() {
console.log(this.checkedArr);
console.log(this.checkedArr);
this.$emit('getProduct', this.checkedArr);
},
@ -396,14 +396,14 @@
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 50%;
text-align: center;
position: absolute;
top: -150rpx;
right: 30rpx;
image {
width: 100%;
height: 100%;
@ -483,7 +483,6 @@
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #959595;
background-color: #E7E6E4;
@ -512,9 +511,7 @@
background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-left: 20rpx;

View File

@ -63,13 +63,13 @@
},
methods: {
navigtion(item) {
if (item.title1 =='发布调货商品') {
if (item.title1 == '发布调货商品') {
uni.navigateTo({
url: '/pages/trading_hall/transfer_goods/index'
})
} else {
uni.navigateTo({
url: '/pages/trading_hall/adddiscounts/index'
})
@ -121,7 +121,7 @@
.release_content_left {
display: flex;
}
.release_content_right {
@ -135,7 +135,7 @@
height: 96rpx;
margin-top: 21rpx;
margin-right: 19rpx;
image {
width: 111rpx;
@ -144,10 +144,10 @@
}
.release_imga {
width: 76rpx;
height: 113rpx;
margin-top: 5rpx;
margin-right: 50rpx;
@ -163,14 +163,12 @@
.title1 {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title2 {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
margin-top: 11rpx;

View File

@ -159,23 +159,23 @@
checkedObj: {
handler(n) {
this.checkedArr = JSON.parse(JSON.stringify(n||{}))
this.checkedArr = JSON.parse(JSON.stringify(n || {}))
},
deep: true
}
},
mounted() {
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj||{}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj||{}))
this.checkedArr = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.aryys = JSON.parse(JSON.stringify(this.checkedObj || {}))
this.getBounht();
},
methods: {
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
// , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id);
obj ? obj.price = e.detail.value:null;
// , ,
let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.price = e.detail.value : null;
// this.$set(item, 'check', false);
// for (let i in this.checkedArr) {
// if (this.checkedArr[i].product_id == item.product_id) {
@ -212,9 +212,9 @@
numberChange(data, i) {
this.peicenumber = data.number;
this.bought[i].number = data.number
// , ,
let obj = this.checkedArr.find((item)=>item.product_id==this.bought[i].product_id);
obj ? obj.number = data.number:null;
// , ,
let obj = this.checkedArr.find((item) => item.product_id == this.bought[i].product_id);
obj ? obj.number = data.number : null;
},
tabs(index) {
@ -285,7 +285,7 @@
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
that.peicenumber = val.number
}
})
})
@ -302,7 +302,7 @@
goodsCheck(item) {
this.$set(item, 'check', !item.check);
if (item.check) {
if (this.peicenumber == 0) {
item.number = 1
}
@ -314,7 +314,7 @@
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
}
},
/*确定提交*/
submit() {
@ -456,7 +456,6 @@
line-height: 60rpx;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #959595;
background-color: #E7E6E4;
@ -485,7 +484,6 @@
background: #F5F5F5;
border-radius: 7rpx 7rpx 7rpx 7rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
margin-left: 20rpx;

File diff suppressed because it is too large Load Diff

View File

@ -163,6 +163,134 @@
"splashscreen" : {
"useOriginalMsgbox" : true
}
},
"nativePlugins" : {
"JG-JCore" : {
"JPUSH_APPKEY_IOS" : "",
"JPUSH_CHANNEL_IOS" : "",
"JPUSH_APPKEY_ANDROID" : "",
"JPUSH_CHANNEL_ANDROID" : "",
"__plugin_info__" : {
"name" : "JG-JCore",
"description" : "极光推送JCore插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY",
"value" : ""
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JCore:CHANNEL",
"value" : ""
},
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
"key" : "JPUSH_APPKEY",
"value" : ""
},
"JPUSH_CHANNEL_ANDROID" : {
"des" : "[Android]用于统计分发渠道不需要可填默认值developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
}
}
}
},
"JG-JPush" : {
"JPUSH_ISPRODUCTION_IOS" : "",
"JPUSH_ADVERTISINGID_IOS" : "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "",
"JPUSH_OPPO_APPKEY" : "",
"JPUSH_OPPO_APPID" : "",
"JPUSH_OPPO_APPSECRET" : "",
"JPUSH_VIVO_APPKEY" : "",
"JPUSH_VIVO_APPID" : "",
"JPUSH_MEIZU_APPKEY" : "",
"JPUSH_MEIZU_APPID" : "",
"JPUSH_XIAOMI_APPKEY" : "",
"JPUSH_XIAOMI_APPID" : "",
"__plugin_info__" : {
"name" : "JG-JPush",
"description" : "极光推送Hbuilder插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_ISPRODUCTION_IOS" : {
"des" : "[iOS]是否是生产环境是填true不是填false或者不填",
"key" : "JPush:ISPRODUCTION",
"value" : ""
},
"JPUSH_ADVERTISINGID_IOS" : {
"des" : "[iOS]广告标识符IDFA如果不需要使用IDFA可不填",
"key" : "JPush:ADVERTISINGID",
"value" : ""
},
"JPUSH_DEFAULTINITJPUSH_IOS" : {
"des" : "[iOS]是否默认初始化是填true不是填false或者不填",
"key" : "JPush:DEFAULTINITJPUSH",
"value" : ""
},
"JPUSH_OPPO_APPKEY" : {
"des" : "厂商OPPO-appkey,示例OP-12345678",
"key" : "OPPO_APPKEY",
"value" : ""
},
"JPUSH_OPPO_APPID" : {
"des" : "厂商OPPO-appId,示例OP-12345678",
"key" : "OPPO_APPID",
"value" : ""
},
"JPUSH_OPPO_APPSECRET" : {
"des" : "厂商OPPO-appSecret,示例OP-12345678",
"key" : "OPPO_APPSECRET",
"value" : ""
},
"JPUSH_VIVO_APPKEY" : {
"des" : "厂商VIVO-appkey,示例12345678",
"key" : "com.vivo.push.api_key",
"value" : ""
},
"JPUSH_VIVO_APPID" : {
"des" : "厂商VIVO-appId,示例12345678",
"key" : "com.vivo.push.app_id",
"value" : ""
},
"JPUSH_MEIZU_APPKEY" : {
"des" : "厂商MEIZU-appKey,示例MZ-12345678",
"key" : "MEIZU_APPKEY",
"value" : ""
},
"JPUSH_MEIZU_APPID" : {
"des" : "厂商MEIZU-appId,示例MZ-12345678",
"key" : "MEIZU_APPID",
"value" : ""
},
"JPUSH_XIAOMI_APPKEY" : {
"des" : "厂商XIAOMI-appKey,示例MI-12345678",
"key" : "XIAOMI_APPKEY",
"value" : ""
},
"JPUSH_XIAOMI_APPID" : {
"des" : "厂商XIAOMI-appId,示例MI-12345678",
"key" : "XIAOMI_APPID",
"value" : ""
}
}
}
}
}
},
/* */

View File

@ -47,7 +47,38 @@
"enablePullDownRefresh": true,
// #endif
"app-plus": {
"scrollIndicator": false //
"scrollIndicator": false, //
"subNVues": [{
"id": "concat", //
"path": "pages/index/subnvue/concat", //
"type": "popup",
"style": {
"position": "absolute",
"dock": "right",
"width": "750rpx",
"height": "1500rpx",
"background": "rgba(0,0,0,0.2)"
}
}]
}
}
},
{
"path": "pages/test/index", //
"style": {
"app-plus": {
"subNVues": [{
"id": "concat", //
"path": "pages/test/subnvue/concat", //
/*"type": "popup", */
"style": {
"position": "absolute",
"dock": "right",
"width": "100rpx",
"height": "150rpx",
"background": "transparent"
}
}]
}
}
},
@ -308,12 +339,11 @@
}
},
{
"path" : "pages/cashier/cashier",
"style" :
{
"navigationBarTitleText" : "收银",
"enablePullDownRefresh" : true
}
"path": "pages/cashier/cashier",
"style": {
"navigationBarTitleText": "收银",
"enablePullDownRefresh": true
}
}
],
"subPackages": [{
@ -1367,7 +1397,15 @@
"navigationBarTitleText": "商品详情"
}
}, {
},
{
"path": "goods_details/videoPlay",
"style": {
"navigationBarTitleText": "视屏详情"
}
},
{
"path": "stockOut/index",
"style": {
"navigationBarTitleText": "扫码出库",
@ -1390,7 +1428,22 @@
"path": "list/index",
"style": {
"navigationBarTitleText": "商品管理",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"app-plus": {
"scrollIndicator": false, //
"subNVues": [{
"id": "concatpro", //
"path": "list/subnvue/concat", //
"type": "popup",
"style": {
"position": "absolute",
"dock": "right",
"width": "750rpx",
"height": "2000rpx",
"background": "rgba(0,0,0,0.2)"
}
}]
}
}
},
{
@ -1505,7 +1558,14 @@
}, {
"path": "addGood/addGood",
"style": {
"navigationBarTitleText": "商品设置",
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
{
"path": "addGood/addGoodOld",
"style": {
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
@ -1536,7 +1596,43 @@
"navigationBarTitleText": "更新库存",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/addGoodDetail",
"style": {
"navigationBarTitleText": "发布商品",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsType",
"style": {
"navigationBarTitleText": "商品分类",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsAttr",
"style": {
"navigationBarTitleText": "商品属性",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsPrice",
"style": {
"navigationBarTitleText": "价格与规格",
"enablePullDownRefresh": false
}
},
{
"path": "addGoodDetail/goodsSearch",
"style": {
"navigationBarTitleText": "商品分类",
"enablePullDownRefresh": false
}
}
]
},
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
<template>
<view class="">
<video :src="url" style="width: 750rpx;height: 1400rpx;" :autoplay='true' id="myvideo" controls></video>
</view>
</template>
<script>
export default {
data() {
return {
url: ""
}
},
methods: {
videoPlay() {
console.log("开始播放了")
},
videoShow() {
this.videoContext = uni.createVideoContext("myvideo", this); // this这个是实例对象 必传
this.videoUrl = this.url;
this.videoContext.requestFullScreen({
// direction: 90
});
this.videoContext.play();
this.videoPlay = true; // 显示播放盒子
}
},
onLoad(option) {
this.url = option.url
setTimeout(() => {
this.videoShow()
})
}
}
</script>
<style>
</style>

View File

@ -5,7 +5,7 @@
<view class="state" v-else-if="orderInfo.status == -1">审核未通过</view>
<view class="state" v-else-if="orderInfo.status == 1">待退货</view>
<view class="state" v-else-if="orderInfo.status == 2">待收货</view>
<view class="state" v-else-if="orderInfo.status == 3">已退款</view>
<view class="state" v-else-if="orderInfo.status == 3">已退款</view>
</view>
<view v-if="orderInfo.refund_type == 2 && orderInfo.status > 0" class="orderingUser acea-row row-middle">
<span class="iconfont icon-yonghu2"></span>{{ orderInfo.user && orderInfo.user.nickname }}
@ -16,7 +16,8 @@
</view>
<view>{{ orderInfo.mer_delivery_address }}</view>
<!-- #ifdef H5 -->
<button class="copy copy-data" :data-clipboard-text="'收货人姓名'+orderInfo.mer_delivery_user+'\n收货人电话'+ orderInfo.phone+'\n收货人地址'+orderInfo.mer_delivery_address">复制</button>
<button class="copy copy-data"
:data-clipboard-text="'收货人姓名:'+orderInfo.mer_delivery_user+'\n收货人电话'+ orderInfo.phone+'\n收货人地址'+orderInfo.mer_delivery_address">复制</button>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="copy" @tap="copyText">复制</button>
@ -26,7 +27,9 @@
<image :src="`${domain}/static/images/line.jpg`" />
</view>
<view class="pos-order-goods">
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`" hover-class="none" class="goods acea-row row-between-wrapper" v-for="(item, index) in orderInfo.refundProduct" :key="index">
<navigator :url="`/pages/goods_details/index?id=${item.product.cart_info.product.product_id}`"
hover-class="none" class="goods acea-row row-between-wrapper"
v-for="(item, index) in orderInfo.refundProduct" :key="index">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="item.product.cart_info.product.image || item.product.cart_info.product.image" />
@ -71,7 +74,7 @@
</view>
<view class="item acea-row row-between">
<view>退款原因</view>
<view class="conter">{{ orderInfo.refund_message }}</view>
<view class="conter">{{ getRightText(orderInfo.refund_message) }}</view>
</view>
<view class="item acea-row row-between">
<view>备注信息</view>
@ -90,26 +93,25 @@
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="more"></view>
<view class="bnt cancel" @click="modify('1')">订单备注</view>
<navigator class="bnt cancel" v-if="orderInfo.status == 2" :url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流</navigator>
<navigator class="bnt cancel" v-if="orderInfo.status == 2"
:url="'/pages/users/goods_logistics/index?refundId='+orderInfo.refund_order_id+'&merId='+mer_id">查看物流
</navigator>
<view class="bnt delivery" v-if="orderInfo.status == 2" @click="confirmOrder">确认收货</view>
</view>
<view>
<view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle">
订单备注
<span class="iconfont icon-guanbi" @click="changeclose"></span>
</view>
<view class="listChange">
<textarea
placeholder="请填写备注信息..."
v-model="orderInfo.mer_mark"
></textarea>
</view>
<view class="modify" @click="save">
确认提交
</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
<view class="priceChange" :class="change === true ? 'on' : ''">
<view class="priceTitle">
订单备注
<span class="iconfont icon-guanbi" @click="changeclose"></span>
</view>
<view class="listChange">
<textarea placeholder="请填写备注信息..." v-model="orderInfo.mer_mark"></textarea>
</view>
<view class="modify" @click="save">
确认提交
</view>
</view>
<view class="mask" @touchmove.prevent v-show="change === true"></view>
</view>
</view>
</template>
@ -132,12 +134,15 @@
refundOrderReceive,
setRefundMark
} from "@/api/admin";
import { isMoney } from '@/utils/validate.js'
import { HTTP_REQUEST_URL } from '@/config/app';
import {
isMoney
} from '@/utils/validate.js'
import {
HTTP_REQUEST_URL
} from '@/config/app';
export default {
name: "AdminOrder",
components: {
},
components: {},
props: {},
data: function() {
return {
@ -155,7 +160,7 @@
payType: "",
types: "",
clickNum: 1,
goname:'',
goname: '',
domain: HTTP_REQUEST_URL,
};
},
@ -179,19 +184,27 @@
var clipboard = new ClipboardJS('.copy-data');
clipboard.on('success', function(e) {
self.$util.Tips({
title:'复制成功'
title: '复制成功'
})
});
clipboard.on('error', function(e) {
self.$util.Tips({
title:'复制失败'
title: '复制失败'
})
});
});
// #endif
},
methods: {
getRightText(str) {
const index = str.indexOf("@");
if (index !== -1) {
return str.substring(index + 1);
} else {
return str
}
},
more: function() {
this.order = !this.order;
},
@ -203,7 +216,7 @@
this.change = false;
},
//
loookImg(item,index){
loookImg(item, index) {
uni.previewImage({
urls: this.orderInfo.pics,
current: this.orderInfo.pics[index]
@ -216,38 +229,37 @@
urls: list
});
},
copyText: function (e) {
// var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [
{
name: "收货人姓名",
value: this.orderInfo.real_name
},
{
name: "收货人电话",
value: this.orderInfo.user_phone
},
{
name: "收货人地址",
value: this.orderInfo.user_address
}
]
wx.setClipboardData({
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
success: function (res) {
wx.getClipboardData({
success: function (res) {
wx.showToast({
title: '复制成功'
})
}
})
}
})
copyText: function(e) {
// var copy = e.currentTarget.dataset.copy; //data-copy
let arr = [{
name: "收货人姓名",
value: this.orderInfo.real_name
},
{
name: "收货人电话",
value: this.orderInfo.user_phone
},
{
name: "收货人地址",
value: this.orderInfo.user_address
}
]
wx.setClipboardData({
data: `${arr.map(item =>`${item.name}: ${item.value}`).join("\n")}`,
success: function(res) {
wx.getClipboardData({
success: function(res) {
wx.showToast({
title: '复制成功'
})
}
})
}
})
},
getIndex: function() {
let that = this;
getRefundOrderDetail(that.mer_id,that.order_id).then(
getRefundOrderDetail(that.mer_id, that.order_id).then(
res => {
that.orderInfo = res.data;
},
@ -269,7 +281,7 @@
content: '为保障权益,请收到货确认无误后,再确认收货',
success: function(res) {
if (res.confirm) {
refundOrderReceive(that.mer_id,that.orderInfo.refund_order_id).then(res => {
refundOrderReceive(that.mer_id, that.orderInfo.refund_order_id).then(res => {
return that.$util.Tips({
title: '操作成功',
icon: 'success'
@ -286,14 +298,16 @@
})
},
//
save(){
save() {
let that = this;
if (!that.orderInfo.mer_mark) {
return this.$util.Tips({
title: '请输入备注'
})
}
setRefundMark(that.mer_id,that.orderInfo.refund_order_id,{ mer_mark: that.orderInfo.mer_mark }).then(
setRefundMark(that.mer_id, that.orderInfo.refund_order_id, {
mer_mark: that.orderInfo.mer_mark
}).then(
res => {
that.change = false;
this.$util.Tips({
@ -318,7 +332,7 @@
}
});
},
copyData(id){
copyData(id) {
uni.setClipboardData({
data: id,
success: function() {
@ -348,36 +362,44 @@
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .header .state {
font-size: 36upx;
color: #fff;
}
.pos-order-details .header .data {
margin-left: 35upx;
font-size: 28upx;
}
.pos-order-details .header .data .order-num {
font-size: 30upx;
margin-bottom: 8upx;
}
.pos-order-details .remarks {
width: 100%;
height: 86upx;
background-color: #fff;
padding: 0 30upx;
}
.pos-order-details .remarks .iconfont {
font-size: 40upx;
color: #2a7efb;
}
.pos-order-details .remarks input {
width: 630upx;
height: 100%;
font-size: 30upx;
}
.pos-order-details .remarks input::placeholder {
color: #666;
}
.pos-order-details .orderingUser {
font-size: 26upx;
color: #282828;
@ -387,17 +409,21 @@
margin-top: 16upx;
border-bottom: 1px solid #f5f5f5;
}
.pos-order-details .orderingUser .iconfont {
font-size: 40upx;
color: #2a7efb;
margin-right: 15upx;
}
.pos-order-details .address {
margin-top: 0;
}
.pos-order-details .pos-order-goods {
margin-top: 17upx;
}
.pos-order-details .footer .more {
font-size: 27upx;
color: #aaa;
@ -408,11 +434,13 @@
margin-right: 25upx;
position: relative;
}
.pos-order-details .footer .delivery {
background: linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -webkit-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
background: -moz-linear-gradient(to right, #2291f8 0%, #1cd1dc 100%);
}
.pos-order-details .footer .more .order .arrow {
width: 0;
height: 0;
@ -423,6 +451,7 @@
left: 15upx;
bottom: -18upx;
}
.pos-order-details .footer .more .order .arrow:before {
content: '';
width: 0;
@ -434,6 +463,7 @@
left: -10upx;
bottom: 0;
}
.pos-order-details .footer .more .order {
width: 200upx;
background-color: #fff;
@ -443,68 +473,84 @@
top: -200upx;
z-index: 9;
}
.pos-order-details .footer .more .order .item {
height: 77upx;
line-height: 77upx;
}
.pos-order-details .footer .more .order .item~.item {
border-top: 1px solid #f5f5f5;
}
.pos-order-details .footer .more .moreName {
width: 100%;
height: 100%;
}
.order-details .header {
padding: 0 30upx;
height: 150upx;
}
.order-details .header.on {
background-color: #666 !important;
}
.order-details .header .pictrue {
width: 110upx;
height: 110upx;
}
.order-details .header .pictrue image {
width: 100%;
height: 100%;
}
.order-details .header .data {
color: rgba(255, 255, 255, 0.8);
font-size: 24upx;
margin-left: 27upx;
}
.order-details .header.on .data {
margin-left: 0;
}
.order-details .header .data .state {
font-size: 30upx;
font-weight: bold;
color: #fff;
margin-bottom: 7upx;
}
.order-details .nav {
background-color: #fff;
font-size: 26upx;
color: #282828;
padding: 25upx 0;
}
.order-details .nav .navCon {
padding: 0 40upx;
}
.order-details .nav .navCon .on {
font-weight: bold;
color: #e93323;
}
.order-details .nav .progress {
padding: 0 65upx;
margin-top: 10upx;
}
.order-details .nav .progress .line {
width: 100upx;
height: 2upx;
background-color: #939390;
}
.order-details .nav .progress .iconfont {
font-size: 25upx;
color: #939390;
@ -515,6 +561,7 @@
text-align: center;
margin-right: 0 !important;
}
.order-details .address {
font-size: 26upx;
color: #868686;
@ -522,52 +569,64 @@
padding: 25upx 30upx 30upx 30upx;
position: relative;
}
.order-details .address .name {
font-size: 30upx;
color: #282828;
margin-bottom: 0.1rem;
}
.order-details .address .name .phone {
margin-left: 40upx;
}
.order-details .line {
width: 100%;
height: 3upx;
}
.order-details .line image {
width: 100%;
height: 100%;
display: block;
}
.order-details .wrapper {
background-color: #fff;
margin-top: 12upx;
padding: 30upx;
}
.order-details .wrapper .item {
font-size: 28upx;
color: #282828;
}
.order-details .wrapper .item~.item {
margin-top: 20upx;
}
.order-details .wrapper .item .conter {
color: #868686;
text-align: right;
}
.order-details .wrapper .item .virtual_image {
// text-align: left;
margin-left: 50rpx;
}
.order-details .wrapper .item .virtual_image .picture{
.order-details .wrapper .item .virtual_image .picture {
width: 106rpx;
height: 106rpx;
border-radius: 8rpx;
margin-right: 10rpx;
&:last-child{
&:last-child {
margin-right: 0;
}
}
.order-details .wrapper .item .conter .copy {
font-size: 20rpx;
color: #868686;
@ -581,7 +640,8 @@
justify-content: center;
border-radius: 16rpx;
}
.address .copy{
.address .copy {
font-size: 20rpx;
color: #868686;
border-radius: 3rpx;
@ -594,17 +654,20 @@
border-radius: 16rpx;
position: absolute;
right: 30rpx;
top: 20rpx;
top: 20rpx;
}
.order-details .wrapper .actualPay {
border-top: 1upx solid #eee;
margin-top: 30upx;
padding-top: 30upx;
}
.order-details .wrapper .actualPay .money {
font-weight: bold;
font-size: 30upx;
}
.order-details .footer {
width: 100%;
height: 100upx;
@ -615,6 +678,7 @@
padding: 0 30upx;
border-top: 1px solid #eee;
}
.order-details .footer .bnt {
width: auto;
height: 60upx;
@ -626,52 +690,65 @@
font-size: 27upx;
padding: 0 3%;
}
.order-details .footer .bnt.cancel {
color: #aaa;
border: 1px solid #ddd;
}
.order-details .footer .bnt.default {
color: #444;
border: 1px solid #444;
}
.order-details .footer .bnt~.bnt {
margin-left: 18upx;
}
.pos-order-goods {
padding: 0 30upx;
background-color: #fff;
}
.pos-order-goods .goods {
height: 185upx;
position: relative;
}
.pos-order-goods .goods~.goods {
border-top: 1px dashed #e5e5e5;
}
.pos-order-goods .goods .picTxt {
width: 515upx;
}
.pos-order-goods .goods .picTxt .pictrue {
width: 130upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 6upx;
}
.pos-order-goods .goods .picTxt .text {
width: 365upx;
height: 130upx;
}
.pos-order-goods .goods .picTxt .text .info {
font-size: 28upx;
color: #282828;
}
.pos-order-goods .goods .picTxt .text .attr {
font-size: 24upx;
color: #999;
}
.pos-order-goods .goods .money {
width: 164upx;
text-align: right;
@ -681,48 +758,117 @@
right: 0;
color: #999999;
}
.pos-order-goods .goods .money .refund_num{
.pos-order-goods .goods .money .refund_num {
display: inline-block;
margin-left: 10rpx;
}
.pos-order-goods .goods .x-money {
color: #FF9600;
}
.priceChange{position:fixed;width:580upx;background-color:#fff;border-radius:10upx;top:50%;left:50%;margin-left:-290upx;margin-top:-335upx;z-index:666;transition:all 0.3s ease-in-out 0s;transform: scale(0);opacity:0;}
.priceChange.on{opacity:1;transform: scale(1);}
.priceChange .priceTitle{background:url("~@/static/images/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:160upx;border-radius:10upx 10upx 0 0;text-align:center;font-size:40upx;color:#fff;line-height:160upx;position:relative;}
.priceChange .priceTitle .iconfont{position:absolute;font-size:40upx;right:26upx;top:23upx;width:40upx;height:40upx;line-height:40upx;}
.priceChange .listChange{padding:0 40upx;}
.priceChange .listChange textarea{box-sizing: border-box;}
.priceChange .listChange .item{height:103upx;border-bottom:1px solid #e3e3e3;font-size:32upx;color:#333;}
.priceChange .modify{font-size:32upx;color:#fff;width:490upx;height:90upx;text-align:center;line-height:90upx;border-radius:45upx;background-color:#2291f8;margin:53upx auto;}
.priceChange .listChange textarea {
border: 1px solid #eee;
width: 100%;
height: 200upx;
margin-top: 50upx;
border-radius: 10upx;
color: #333;
padding: 20upx;
}
.upload-img{
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
.img-item{
.priceChange {
position: fixed;
width: 580upx;
background-color: #fff;
border-radius: 10upx;
top: 50%;
left: 50%;
margin-left: -290upx;
margin-top: -335upx;
z-index: 666;
transition: all 0.3s ease-in-out 0s;
transform: scale(0);
opacity: 0;
}
.priceChange.on {
opacity: 1;
transform: scale(1);
}
.priceChange .priceTitle {
background: url("~@/static/images/pricetitle.jpg") no-repeat;
background-size: 100% 100%;
width: 100%;
height: 160upx;
border-radius: 10upx 10upx 0 0;
text-align: center;
font-size: 40upx;
color: #fff;
line-height: 160upx;
position: relative;
width: 156rpx;
height: 156rpx;
margin-right: 23rpx;
}
.priceChange .priceTitle .iconfont {
position: absolute;
font-size: 40upx;
right: 26upx;
top: 23upx;
width: 40upx;
height: 40upx;
line-height: 40upx;
}
.priceChange .listChange {
padding: 0 40upx;
}
.priceChange .listChange textarea {
box-sizing: border-box;
}
.priceChange .listChange .item {
height: 103upx;
border-bottom: 1px solid #e3e3e3;
font-size: 32upx;
color: #333;
}
.priceChange .modify {
font-size: 32upx;
color: #fff;
width: 490upx;
height: 90upx;
text-align: center;
line-height: 90upx;
border-radius: 45upx;
background-color: #2291f8;
margin: 53upx auto;
}
.priceChange .listChange textarea {
border: 1px solid #eee;
width: 100%;
height: 200upx;
margin-top: 50upx;
border-radius: 10upx;
color: #333;
padding: 20upx;
}
.upload-img {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
&:nth-child(4n){
margin-right: 0;
}
image{
.img-item {
position: relative;
width: 156rpx;
height: 156rpx;
border-radius: 8rpx;
margin-right: 23rpx;
margin-top: 20rpx;
&:nth-child(4n) {
margin-right: 0;
}
image {
width: 156rpx;
height: 156rpx;
border-radius: 8rpx;
}
}
}
}
</style>
</style>

View File

@ -106,6 +106,7 @@
this.isAuto = true;
this.isShowAuth = true
}
this.getindex()
},
onHide() {
if (this.timer) {
@ -145,6 +146,8 @@
this.isAuto = true;
this.isShowAuth = true
}
// this.getList(this.mer_id)
// this.getList(res.data.service.mer_id, true);
});
},
onLoadFun() {

View File

@ -9,8 +9,8 @@
<view class="item-one">
被委托商家
</view>
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1"
placeholder="选择选项"></e-select>
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1"
@change="change1" placeholder="选择选项"></e-select>
</view>
<view class="release_item-one">
<view class="item-one">
@ -170,16 +170,16 @@
},
//
getProduct(data) {
this.productList = [];
this.formData.product_info = [];
this.formData.content = '';
if (data.length > 0) {
this.productList = data;
this.productList = [];
this.formData.product_info = [];
this.formData.content = '';
if (data.length > 0) {
this.productList = data;
for (let i in data) {
this.formData.content += data[i].store_name + ',';
if(typeof this.productList[i].image == 'object'){
this.productList[i].image = this.productList[i].image[0]
}
if (typeof this.productList[i].image == 'object') {
this.productList[i].image = this.productList[i].image[0]
}
this.formData.product_info.push({
product_attr_unique: data[i].product_attr_unique,
number: Number(data[i].number),
@ -187,7 +187,7 @@
})
}
}
this.formData.content = this.formData.content.slice(0,-1);
this.formData.content = this.formData.content.slice(0, -1);
this.$refs.associated.close()
},
//
@ -199,79 +199,79 @@
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
title: '请选择委托周期'
});
if (value.entrust_day < 15) return that.$util.Tips({
title: '委托周期不得小于15天'
});
if (value.entrust_day > 90) return that.$util.Tips({
title: '委托周期不得大于90天'
});
if (value.entrust_day < 15) return that.$util.Tips({
title: '委托周期不得小于15天'
});
if (value.entrust_day > 90) return that.$util.Tips({
title: '委托周期不得大于90天'
});
if (value.product_info.length == 0) return that.$util.Tips({
title: '请选择产品'
});
if (!value.entrust_mer_id) return that.$util.Tips({
title: '请添加商家'
});
this.type?
editentrust(this.id,value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '编辑成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
:
entrustchain(value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
this.type ?
editentrust(this.id, value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '编辑成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
return that.$util.Tips({
title: err
});
})
:
entrustchain(value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
}
}
@ -316,7 +316,6 @@
.center-one-txt {
.one-txta {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -325,7 +324,6 @@
display: flex;
margin-top: 28rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
@ -351,7 +349,6 @@
margin-top: 32rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
@ -525,7 +522,6 @@
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 42px 42px 42px 42px;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
}

View File

@ -101,7 +101,8 @@
<view class="center-twoa">
拒绝原因:
</view>
<view class="center-twob" :style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
<view class="center-twob"
:style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
{{objinfo.entrust_finish_refusal}}
</view>
</view>
@ -111,7 +112,7 @@
<view class="content_bootm">
<view class="content_bootm_txt">
查看TA提到的宝贝
<text v-if="objinfo.product_list">({{objinfo.product_list.length||0}})</text>
<text v-if="objinfo.product_list">({{objinfo.product_list.length||0}})</text>
</view>
@ -154,13 +155,13 @@
}
],
type: 0,
credit_buy: 0,
credit_buy: 0,
}
},
onLoad(e) {
this.list(e.id)
this.type = e.type
this.credit_buy = e.credit_buy || 0;
this.credit_buy = e.credit_buy || 0;
},
onShow() {
@ -233,7 +234,6 @@
.top-two-one {
font-size: 35rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 10rpx;
@ -280,7 +280,6 @@
.center-one-txt {
.one-txta {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -289,7 +288,6 @@
display: flex;
margin-top: 28rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
@ -316,7 +314,6 @@
.center-twoa {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
}
@ -327,7 +324,6 @@
word-wrap: break-word;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
}
@ -377,7 +373,6 @@
background: linear-gradient(84deg, #F98649 0%, #F34E45 100%);
border-radius: 42px 42px 42px 42px;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
position: absolute;

View File

@ -147,7 +147,6 @@
.titlea {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
@ -155,7 +154,6 @@
.titleb {
margin-top: 5rpx;
font-size: 25rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.8);
}

View File

@ -11,92 +11,92 @@
<view class="content-one">
<view class="content-one-img">
<!-- <image :src="item.mer_info&&item.mer_info.mer_avatar" mode="aspectFit"></image> -->
<image :src="item.entrust_mer_info&&item.entrust_mer_info.mer_avatar" mode="aspectFill"></image>
<image :src="item.entrust_mer_info&&item.entrust_mer_info.mer_avatar" mode="aspectFill"></image>
</view>
<view class="content-text">
<view class="flex" style="justify-content: space-between;">
<view class="one-txt-a">
{{item.title}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;">
待处理
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝
</view>
</view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
</view>
</block>
</view>
<view class="text-bottom">
<view class="one-txt-b">
委托周期:{{item.entrust_day}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn">
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view>
<span></span>
<view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn">
<view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
结束委托
</view>
<span v-if="item.entrust_finish==3"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn">
<!--<view class="contentgn_a" @click="deleteOrder(item)">
<view class="one-txt-a">
{{item.title}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;">
待处理
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝
</view>
</view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
</view>
</block>
</view>
<view class="text-bottom">
<view class="one-txt-b">
委托周期:{{item.entrust_day}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn">
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view>
<span></span>
<view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn">
<view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
结束委托
</view>
<span v-if="item.entrust_finish==3"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn">
<!--<view class="contentgn_a" @click="deleteOrder(item)">
删除
</view>
<span></span> -->
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="contentgn">
<view class="contentgn_a" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</block>
</view>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="contentgn">
<view class="contentgn_a" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
@ -112,7 +112,7 @@
<emptyPage title="暂无订单~"></emptyPage>
</view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<view style="height: 200rpx;"></view>
<view style="height: 200rpx;"></view>
<uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
@ -418,7 +418,7 @@
// this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open()
},
agree(item, status=2) {
agree(item, status = 2) {
finishentrust(item.community_id, {
status: status,
refusal: this.refuseds
@ -437,31 +437,31 @@
},
//
deleteOrder(item) {
uni.showModal({
title:'警告',
content:'删除后不可恢复, 是否继续删除?',
complete: (e) => {
if(e.confirm){
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
}).catch((err) => {
console.log(err)
this.$util.Tips({
title: err,
icon: 'error'
})
})
}
}
})
uni.showModal({
title: '警告',
content: '删除后不可恢复, 是否继续删除?',
complete: (e) => {
if (e.confirm) {
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
}).catch((err) => {
console.log(err)
this.$util.Tips({
title: err,
icon: 'error'
})
})
}
}
})
},
//
auditEdit() {
@ -542,7 +542,6 @@
.adddelegation-two {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 25rpx;
@ -569,7 +568,7 @@
.content-one {
width: 100%;
width: 100%;
display: flex;
padding-bottom: 23rpx;
@ -579,8 +578,8 @@
height: 148rpx;
margin-right: 28rpx;
// border: 1px solid;
border-radius: 10rpx;
overflow: hidden;
border-radius: 10rpx;
overflow: hidden;
image {
width: 100%;
@ -593,7 +592,6 @@
.txt-b-a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -612,33 +610,35 @@
.txt-b-b {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333
}
}
}
.content-text{
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.text-bottom{
display: flex;
justify-content: space-between;
}
.one-txt-a{
flex: 1;
font-size: 30rpx;
display: -webkit-box;
-webkit-line-clamp: 2; /* 限制为三行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
.content-text {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.text-bottom {
display: flex;
justify-content: space-between;
}
.one-txt-a {
flex: 1;
font-size: 30rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制为三行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
@ -686,7 +686,6 @@
.contentgn_a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #F84221;
margin-right: 10rpx;
@ -704,7 +703,6 @@
.contentgn_b {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 10rpx;
@ -716,7 +714,7 @@
.content-two_one {
flex-shrink: 0;
flex-shrink: 0;
text-align: right;
@ -760,7 +758,6 @@
.contentgn_a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #F84221;
margin-right: 10rpx;
@ -777,7 +774,6 @@
.contentgn_b {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 10rpx;
@ -819,7 +815,6 @@
.bg-content-a {
margin-left: 242rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -827,14 +822,12 @@
.bg-content-b {
margin-left: 35rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 32rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
@ -844,14 +837,12 @@
.bg-content-c {
margin-left: 35rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 32rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
@ -867,7 +858,6 @@
height: 95rpx;
line-height: 95rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 121rpx;
@ -880,7 +870,6 @@
line-height: 95rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
@ -904,7 +893,6 @@
.bg-content-a {
margin-left: 242rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -917,7 +905,6 @@
height: 95rpx;
line-height: 95rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 121rpx;
@ -930,7 +917,6 @@
line-height: 95rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
@ -957,7 +943,6 @@
.bg-content-a {
margin-left: 242rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -965,14 +950,12 @@
.bg-content-b {
margin-left: 35rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 32rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
@ -982,14 +965,12 @@
.bg-content-c {
margin-left: 35rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 22rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
@ -1017,7 +998,6 @@
line-height: 95rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);

View File

@ -13,94 +13,98 @@
</view>
<view class="content-text">
<view class="flex" style="justify-content: space-between;">
<view class="one-txt-a">
{{item.title}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;">
待处理
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝
</view>
</view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
</view>
</block>
</view>
<view class="text-bottom">
<view class="one-txt-b">
委托周期:{{item.entrust_day}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn">
<view class="contentgn_a" @click="soldEdit(item)">
处理
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn">
<block v-if="item.entrust_order_id>0&&item.mer_status==1">
<view class="contentgn_a" v-if="item.entrust_finish==0" style="margin-left: 10rpx;" @click="closingorder(item)">
申请结束
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==1" style="margin-left: 10rpx; color: #20A162;">
已结束
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==2" @click="closingorder(item)" style="margin-left: 10rpx;">
被拒绝
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==3" style="margin-left: 10rpx; color: #FE9A10;">
申请中
</view>
<span></span>
</block>
<view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;"
@click="order(item)">
去下单
</view>
<span v-if="item.entrust_order_id==0"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="contentgn">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</block>
</view>
<view class="one-txt-a">
{{item.title}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" style="font-weight: bold;">
待处理
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted" style="font-weight: bold;">
已接受
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined" style="font-weight: bold;">
已拒绝
</view>
</view>
<view class="content-two_one" v-if="item.type==4" style="font-weight: bold;">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
</view>
</block>
</view>
<view class="text-bottom">
<view class="one-txt-b">
委托周期:{{item.entrust_day}}
</view>
<block>
<view class="content-two_one" v-if="item.mer_status==0">
<view class="contentgn">
<view class="contentgn_a" @click="soldEdit(item)">
处理
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="contentgn">
<block v-if="item.entrust_order_id>0&&item.mer_status==1">
<view class="contentgn_a" v-if="item.entrust_finish==0"
style="margin-left: 10rpx;" @click="closingorder(item)">
申请结束
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==1"
style="margin-left: 10rpx; color: #20A162;">
已结束
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==2"
@click="closingorder(item)" style="margin-left: 10rpx;">
被拒绝
</view>
<view class="contentgn_a" v-else-if="item.entrust_finish==3"
style="margin-left: 10rpx; color: #FE9A10;">
申请中
</view>
<span></span>
</block>
<view class="contentgn_a" v-if="item.entrust_order_id==0"
style="margin-left: 10rpx;" @click="order(item)">
去下单
</view>
<span v-if="item.entrust_order_id==0"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.mer_status==2">
<view class="contentgn">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="contentgn">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
@ -120,23 +124,23 @@
<view class="bg-content-a">
委托申请处理
</view>
<view class="bg-content-d" >
委托方: <span>{{obj.mer_info.mer_name}}</span>
</view>
<view class="bg-content-d">
委托方: <span>{{obj.mer_info.mer_name}}</span>
</view>
<block v-if="obj.mer_info.credit_buy">
<view class="bg-content-b" >
结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c" >
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view>
</block>
<block v-else>
<view class="bg-content-b" >
该商户暂不支持先货后款
</view>
<view style="height: 60rpx;"></view>
</block>
<view class="bg-content-b">
结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c">
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view>
</block>
<block v-else>
<view class="bg-content-b">
该商户暂不支持先货后款
</view>
<view style="height: 60rpx;"></view>
</block>
<view class="entrust_bga_btn">
<view class="cancellation" @click="passDelete(obj)">
拒绝
@ -249,7 +253,7 @@
entrustlist,
finishchain,
checkchain,
addEntrustCart
addEntrustCart
} from '@/api/sale.js'
export default {
components: {
@ -264,7 +268,7 @@
activeItem: "tabOne",
tabTitle: "",
orderList: [],
type_id: '',
type_id: '',
where: {
page: 1,
type: 2,
@ -316,7 +320,7 @@
}
},
onLoad(options) {
this.type_id = options.type_id
this.type_id = options.type_id
this.tabTitle = this.tabs[0].name
// -- :
console.log(this.tabs[0])
@ -390,20 +394,20 @@
// uni.navigateTo({
// url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
// })
addEntrustCart({
community_id: item.community_id
}).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message,
icon: 'success'
})
uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id.toString()}&type_id=${this.type_id}`
})
}
})
addEntrustCart({
community_id: item.community_id
}).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message,
icon: 'success'
})
uni.navigateTo({
url: `/pages/users/order_confirm/index?cartId=${res.data.cart_id.toString()}&type_id=${this.type_id}`
})
}
})
},
//
deteragrss(item) {
@ -421,7 +425,7 @@
this.commislist()
this.$refs.bindmobile1.close()
}).catch((err) => {
this.$refs.bindmobile1.close()
this.$refs.bindmobile1.close()
this.$util.Tips({
title: err,
icon: 'error'
@ -507,7 +511,7 @@
.content-one {
width: 100%;
width: 100%;
display: flex;
padding-bottom: 23rpx;
@ -516,9 +520,9 @@
height: 148rpx;
margin-right: 28rpx;
// border: 1px solid;
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
image {
width: 100%;
@ -527,11 +531,10 @@
}
.content-one-txt {
flex: 1;
flex: 1;
.txt-b-a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -550,39 +553,41 @@
.txt-b-b {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333
}
}
}
.content-text{
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.text-bottom{
display: flex;
justify-content: space-between;
}
.one-txt-a{
flex: 1;
font-size: 30rpx;
display: -webkit-box;
-webkit-line-clamp: 2; /* 限制为三行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
.content-text {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.text-bottom {
display: flex;
justify-content: space-between;
}
.one-txt-a {
flex: 1;
font-size: 30rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制为三行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.content-two_oneq {
text-align: right;
flex-shrink: 0;
flex-shrink: 0;
.content-two-edita {
@ -624,7 +629,6 @@
.contentgn_a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #F84221;
margin-right: 10rpx;
@ -642,7 +646,6 @@
.contentgn_b {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 10rpx;
@ -654,7 +657,7 @@
.content-two_one {
flex-shrink: 0;
flex-shrink: 0;
text-align: right;
@ -698,7 +701,6 @@
.contentgn_a {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #F84221;
margin-right: 10rpx;
@ -716,7 +718,6 @@
.contentgn_b {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 10rpx;
@ -757,7 +758,6 @@
.bg-content-a {
margin-left: 242rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
@ -765,14 +765,12 @@
.bg-content-b {
margin-left: 35rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 16rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
@ -782,35 +780,32 @@
.bg-content-c {
margin-left: 35rpx;
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 16rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
}
}
.bg-content-d {
margin-left: 35rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 16rpx;
span {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
}
}
.bg-content-d {
margin-left: 35rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-top: 16rpx;
span {
font-size: 32rpx;
font-weight: 500;
color: #F84221;
margin-left: 18rpx;
}
}
}
.entrust_bga_btn {
@ -821,7 +816,6 @@
height: 95rpx;
line-height: 95rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
color: #999999;
margin-left: 121rpx;
@ -834,7 +828,6 @@
line-height: 95rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(180deg, #F98649 0%, #F34E45 100%);

View File

@ -78,10 +78,11 @@
常用工具
<view class=""></view>
</view>
<view class="tools-two"
<!-- <view class="tools-two"
v-if="isgShow&&userInfoData.mer_info.setting_status==1&&userInfoData.mer_info.type_code=='TypeSupplyChain'">
<view class="" v-for="(item,k) in typelistSupplyChain" :key='k' @click="navation(item)">
<view class="tools-two-img">
<image :src="item.image" mode=""></image>
</view>
<view class="tools-two-title"> {{item.name}}</view>
@ -91,27 +92,28 @@
v-else-if="isgShow&&userInfoData.mer_info.setting_status==1&&userInfoData.mer_info.type_code=='PersonalStore'">
<view class="" v-for="(item,k) in typePersonalStoreList" :key='k' @click="navation(item)">
<view class="tools-two-img">
<image :src="item.image" mode=""></image>
</view>
<view class="tools-two-title"> {{item.name}}</view>
</view>
</view>
<view class="tools-two" v-else-if="isgShow&&userInfoData.mer_info.setting_status==1">
</view> -->
<view class="tools-two" v-if="isgShow">
<view class="" v-for="(item,k) in typelist" :key='k' @click="navation(item)">
<view class="tools-two-img">
<view class="tools-two-img " :id="'asas'+k">
<image :src="item.image" mode=""></image>
</view>
<view class="tools-two-title"> {{item.name}}</view>
</view>
</view>
<view class="tools-two" v-else>
<!-- <view class="tools-two" v-else>
<view class="" @click="byset">
<view class="tools-two-img">
<image src="@/static/images/index11.png" mode=""></image>
</view>
<view class="tools-two-title"> 商家设置</view>
</view>
</view>
</view> -->
</view>
<view class="content-list">
@ -417,8 +419,10 @@
merstreet,
getUserInfo,
getAdminApplyAPI,
progressBankList
progressBankList,
isNewMer
} from '@/api/user.js';
import {
business,
intention,
@ -446,6 +450,8 @@
},
data() {
return {
subNVue: '',
elInfo: {},
isAuto: false, //
isShowAuth: false, //
loadEndFlag: false,
@ -510,11 +516,11 @@
type: 1,
image: require('@/static/images/index7.png')
},
{
name: '入库管理',
type: 13,
image: require('@/static/images/index9.png')
},
// {
// name: '',
// type: 13,
// image: require('@/static/images/index9.png')
// },
// {
// name: '',
// type: 3,
@ -611,11 +617,11 @@
type: 1,
image: require('@/static/images/index7.png')
},
{
name: '入库管理',
type: 13,
image: require('@/static/images/index9.png')
},
// {
// name: '',
// type: 13,
// image: require('@/static/images/index9.png')
// },
{
name: '订单管理',
type: 2,
@ -691,11 +697,11 @@
type: 1,
image: require('@/static/images/index7.png')
},
{
name: '入库管理',
type: 13,
image: require('@/static/images/index9.png')
},
// {
// name: '',
// type: 13,
// image: require('@/static/images/index9.png')
// },
{
name: '订单管理',
type: 2,
@ -838,6 +844,7 @@
},
async onLoad() {
this.subNVue = uni.getSubNVueById('concat')
this.Fheight = uni.getSystemInfoSync().windowHeight + 'px';
await this.$onLaunched;
this.list1();
@ -846,6 +853,13 @@
this.$u.sleep(5000).then(() => {
this.loadEndFlag = true;
});
uni.$on('diverIndexSubEmit', () => {
this.subNVue.hide()
uni.navigateTo({
url: '/pages/product/list/index'
})
})
},
onReachBottom() {
@ -856,11 +870,36 @@
}, 10)
}
},
onReady() {
// if (Boolean(this.$store.state.app.userInfo.service?.mer_id)) {
// isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => {
// if (res.data == 'true') {
// let that = this
// const query = uni.createSelectorQuery().in(this);
// query
// .select(".tools-two-img")
// .boundingClientRect((data) => {
// let info = JSON.stringify(data)
// that.elInfo = data
// // #ifdef APP-PLUS
// that.openDiver()
// // #endif
// })
// .exec();
// }
// })
// }
},
onShow() {
if (this.loadEndFlag) {
this.codelist();
this.getUserInfo();
} else {
this.isNewUser()
console.log('1111111111')
}
// this.getGoods(true);
},
@ -871,6 +910,56 @@
},
methods: {
isNewUser(data) {
let user;
if (data) {
user = data
} else {
user = this.$store.state.app.userInfo
}
setTimeout(() => {
if (Boolean(user.service?.mer_id)) {
isNewMer(user.uid, user.service
?.mer_id).then(
res => {
if (res.data == 'true' && this.elInfo) {
let that = this
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query
.select(".tools-two-img")
.boundingClientRect((data) => {
let info = JSON.stringify(data)
that.elInfo = data
// #ifdef APP-PLUS
that.openDiver()
// #endif
})
.exec();
}, 500)
}
})
}
}, 500)
},
test1() {
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id).then(res => {
console.log(res, 'res')
})
},
test2() {
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id, {
done: 1
}).then(res => {
console.log(res, 'res')
})
},
openDiver() {
this.subNVue.show('zoom-out', 300)
uni.$emit('diverIndexEmit', this.elInfo);
},
//
handleToWithDraw(item, index) {
if (index == 4) return;
@ -1295,6 +1384,7 @@
this.userid = res.data.uid
this.userInfoData = res.data;
this.$store.commit('SET_USERINFO', res.data);
this.isNewUser(res.data)
this.merchantData.phone = res.data.phone;
if (res.data.mer_info.is_company == 0) !this.merchantData.company_name ? this.merchantData
.company_name = "" : null;

View File

@ -0,0 +1,247 @@
<template>
<view class="" style="width: 750rpx;height: 100%;">
<view class="jump" @click="jump">
<text class="font">跳过</text>
</view>
<view class="target" :style="{left:(left-9)+'px',top:(top-9)+'px'}">
<image src="/static/images/index7.png" class="imgs"></image>
</view>
<view class="" class="pointe" :style="{ left:(left-10)+'px',top:(top)+'px'}">
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;" mode=""></image>
</view>
<view class="tips" :style="{ left:left+'px',top:(top-200)+'px'}">
<view class="tras" :class="{act:isActive}">
<text class="font" style="line-height: 106rpx;">点击商品管理,发布商品</text>
</view>
</view>
<view class="center" :style="{left:(left+35)+'px', top:(top-60)+'px'}">
<image src="/static/images/greenLine.png" style="width:35px;height: 60px;" mode=""></image>
</view>
<view class="next-btn">
<text class="next-btn-text font" @click="next">下一步(3/4) </text>
</view>
</view>
</template>
<script>
import {
isNewMer
} from '@/api/user.js';
export default {
data() {
return {
isActive: false,
left: 33,
top: 0,
subNVue: null,
offsetX: 0,
offsetY: 0,
}
},
methods: {
jump() {
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id, {
done: 1
}).then(res => {
console.log(res, 'res')
})
this.subNVue.hide('zoom-in', 300, )
},
next() {
// this.subNVue = uni.getSubNVueById('concat')
// this.subNVue.hide('zoom-in', 300, )
uni.$emit('diverIndexSubEmit');
}
},
onLoad() {
this.subNVue = uni.getSubNVueById('concat')
let that = this
uni.$on('diverIndexEmit', (data) => {
that.left = data.left
that.top = data.top
})
setTimeout(() => {
that.isActive = true
}, 1000)
}
}
</script>
<style>
.target {
position: relative;
width: 160rpx;
height: 160rpx;
border-radius: 160rpx;
background-color: white;
}
.greenLine {
width: 10rpx;
height: 100rpx;
background-color: green;
position: absolute;
left: 40px;
transform: translate(-50%, 0);
z-index: 999;
top: -40px;
}
.imgs {
width: 62px;
height: 62px;
position: absolute;
left: 40px;
top: 40px;
transform: translate(-50%, -50%);
}
.tras {
position: absolute;
z-index: 999 !important;
width: 0;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 462rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
}
.bgimg {
width: 200rpx;
position: absolute;
z-index: 1;
}
.img {
opacity: 0;
width: 50rpx;
height: 50rpx;
transition-property: opacity;
transition-duration: 1s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.next-btn {
position: absolute;
bottom: 100rpx;
left: 375rpx;
transform: translateX(-50%);
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
background: rgba(255, 255, 255, 0.4);
}
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
.jump {
position: absolute;
right: 30rpx;
top: 80rpx;
border: 1px solid white;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.tips {
width: 462rpx;
height: 106rpx;
background-color: #5BE157;
border-radius: 20rpx;
}
.center {
position: absolute;
left: 375rpx;
transform: translateX(-50%);
}
.tabbar {
width: 136rpx;
height: 136rpx;
background-color: white;
border-radius: 136rpx;
position: absolute;
}
.tab-icon {
width: 50rpx;
height: 50rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, -50%);
top: 68rpx;
}
.te {
font-size: 20rpx;
position: absolute;
left: 68rpx;
transform: translate(-50%, 0);
top: 100rpx;
}
.pointe {
position: absolute;
}
.tras {
padding-left: 20rpx;
position: absolute;
z-index: 999 !important;
width: 20px;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 462rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
}
.next-btn {
position: absolute;
bottom: 100px;
left: 375rpx;
transform: translateX(-50%);
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
}
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
</style>

View File

@ -1,14 +1,14 @@
<template>
<view class="select_warehouse">
<view class="wrapper flex_a_c_j_sb">
<!-- <view class="wrapper flex_a_c_j_sb">
<block v-for="item in goodsData" :key="item.name">
<view class="select_item select_item1" @click="navigato(item.type)" :class="'select_item'+item.type">
<view class="title">{{ item.name }}</view>
<!-- <view class="iconfont icon-jiantou"></view> -->
{{item.type}}
<image class="img" :src="item.src"></image>
</view>
</block>
</view>
</view> -->
<view v-if="pageType==1" class="list-box-put">
<view class="item" v-for="(item, index) in goods" :key="index">
<view class="top">
@ -171,11 +171,11 @@
</view>
</view>
</u-popup>
<u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
<u-popup :show="searchGoodsShow" :round="18" mode="center">
<view class="search_goods_box">
<input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称">
<view class="search_goods_btn">
<view class="cancel edit_btn" @click="searchGoodsShow=false">取消</view>
<view class="cancel edit_btn" @click="handCancel">取消</view>
<view class="search edit_btn" @click="searchGoodsClose">搜索</view>
</view>
</view>
@ -194,6 +194,7 @@
import {
productCreate
} from '@/api/product.js'
import {
microSeachBarCode,
microEadtProduct,
@ -217,19 +218,16 @@
goodsData: [{
name: '搜索名称入库',
type: 1,
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
src: '/static/images/SMRK/name.png'
},
{
name: '标品扫码入库',
type: 2,
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
src: '/static/images/SMRK/bar.png'
},
{
name: '非标手动入库',
type: 3,
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
src: '/static/images/SMRK/img.png'
}
],
@ -295,6 +293,15 @@
this.mer_id = e.mer_id
this.userInfo = this.$store.state.app.userInfo;
if (typeof this.userInfo == 'string') this.userInfo = JSON.parse(this.userInfo);
if (e.type) {
uni.showLoading({
title: '正在加载中'
});
setTimeout(() => {
uni.hideLoading();
this.navigato(e.type)
}, 700)
}
// if(this.userInfo.mer_info.type_code=='PersonalStore'){
// this.goodsData = [{
// name: '',
@ -305,11 +312,21 @@
// }
},
onShow() {
console.log('show')
},
methods: {
handCancel() {
uni.redirectTo({
url: '/pages/product/list/index'
})
},
addGoods(item = {}) {
item = JSON.parse(JSON.stringify(item));
item = (JSON.stringify(item));
console.log(item)
uni.navigateTo({
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&goodsInfo=${item}`
})
return
// if(this.isNullImage(item.image)||
// ( this.isNullImage(item.slider_image[0]) && this.isNullImage(item.slider_image[1]) && this.isNullImage(item.slider_image[2]) )){
// return Toast('');
@ -624,13 +641,13 @@
}
},
navigato(type) {
if (type === 1) {
if (type == 1) {
this.searchGoodsName = '';
this.searchGoodsShow = true;
this.pageType = 1;
} else if (type == 2) {
this.scanCode();
this.pageType = 1;
// this.pageType = 1;
} else {
// this.photograph();
// this.pageType = 2;
@ -646,8 +663,21 @@
self.seachBarCode(res.result)
},
fail(res) {
// console.log(res);
uni.redirectTo({
url: '/pages/product/list/index'
})
// uni.showLoading({
// title: '',
// mask: true
// })
// uni.navigateBack()
},
// complete() {
// uni.showLoading({
// title: '',
// mask: true
// })
// }
})
},
isStartsWith6Or06(str) {
@ -655,6 +685,7 @@
return regex.test(str);
},
async seachBarCode(code) {
console.log("laizheer;e1")
if (code.length < 12) {
return Toast('条形码长度不正确, 请重试!')
}
@ -763,6 +794,15 @@
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
onBackPress: function(e) {
uni.redirectTo({
url: '/pages/product/list/index'
})
// uni.navigateBack()
// return false
// this.showlay = true
// return this.go;
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,762 @@
<template>
<view class="container">
<view class="step_one">
<view class="input_content">
<view class="bar-code" v-if="bar_code_dis">
<view>商品条码</view>
<input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis"
placeholder-class="inputPlaceHolder" />
</view>
<view class="input_content_textarea">
<textarea v-model="setFormData.store_name" placeholder="请输入45商品名称"
placeholder-class="placeholderStyle" maxlength="60" />
<view class="flex" style="justify-content: space-between;color: #999999;">
<view>(品牌,名称,规格,口味)</view>
<view>
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
<text v-else>0</text>/60
</view>
</view>
</view>
<view class="photo_count">
<text class="photo_size" style="color: #e93323;">建议图片尺寸为750*750px, 上传2张以上</text>
<view class="input_content_photo">
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList"
:key="index">
<image :src="item" class="myimg2 photos" @click="pop(item)"></image>
<view class="input_content_photo_adPh_jiao" @click="deleteImage(index)">
<image src="../static/images/close.png" mode=""></image>
</view>
</view>
<view v-if="setFormData.imageList.length < 9" class="input_content_photo_adPh addBtn"
@click="clk">
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加图片</view>
</view>
</view>
</view>
<u-popup ref="select_popup" class="pop" :show="show" mode="center" closeOnClickOverlay
bgColor='transparent'>
<image :src="image"></image>
<image src="@/static/images/guanbi.png" class="guanbi" @click="close"></image>
</u-popup>
</view>
<!-- 商品详情 -->
<commodityComponent ref="commodityRef" v-if="showCommodity" :key="showCommodity"
:showCommodity="showCommodity" :product_id="product_id" :merId="merId" :code="code">
</commodityComponent>
<view class="popup_group">
<view class="popup_group_item popup_group_item_b" @click="selectPlatform">
<view class="popup_group_item_label">平台分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<span v-if="setFormData.cate_name"
class="popup_group_item_message_value">{{ setFormData.cate_name }}</span>
<span v-else>请选择平台分类</span>
</view>
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view>
<view class="popup_group_item" @click="selectStoreClass">
<view class="popup_group_item_label ">店铺分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<span v-if="setFormData.mer_cate_name"
class="popup_group_item_message_value">{{ setFormData.mer_cate_name }}</span>
<span v-else>请选择店铺分类</span>
</view>
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view>
<view class="popup_group_item popup_group_item_b">
<view class="popup_group_item_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
placeholder="请填写商品单位" /></view>
</view>
</view>
<!-- 选择平台分类弹框 -->
<uni-popup ref="select_platform" type="bottom">
<platfrom @close="closePlatfrom" :classifiedData="platformClassificationData"
@getPlatData="getPlatData">
</platfrom>
</uni-popup>
<!-- 选择店铺分类弹框 -->
<uni-popup ref="select_store" type="bottom">
<store-classification :classifiedData="merchantClassification" :mer_id="merId"
@handleGetSelectArea="handleGetSelectStore" @close="merchantClose"></store-classification>
</uni-popup>
<!-- 规格设置 -->
<picker mode="selector" :range="['单规格','多规格']" :value="setFormData.spec_type" @change="changeSpecType">
<view class="popup_group" style="margin-bottom: 0;">
<view class="popup_group_item">
<view class="popup_group_item_label">商品规格</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<span
class="popup_group_item_message_value">{{ setFormData.spec_type==0?'单规格':'多规格' }}</span>
</view>
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view>
</view>
<u-modal :show="showSpecType" title="温馨提示" content="切换后商品原有规格将失效,是否继续?" show-cancel-button
confirm-text="继续" @confirm="changeSpecType2" @cancel="showSpecType=false"></u-modal>
</picker>
<priceComponent v-if="setFormData.spec_type==0" :datas="setFormData.attrValue[0]" ref="priceRef"
:product_id="product_id" :bar_code="code" @updateCode="updateCode">
</priceComponent>
<view v-else class="popup_group" style="margin-top: 0;border-top: 1rpx solid #eeeeee;">
<view class="popup_group_item" @click="navToSpecGood()">
<view class="popup_group_item_label" style="flex: 1; text-align: center;">
设置多规格
<text v-if="setFormData.attrValue.length>0">({{setFormData.attrValue.length}})</text>
</view>
</view>
</view>
<view class="popup_group">
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view> -->
<block>
<view class="input_content">
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num">
<text v-if="setFormData.store_info">{{ setFormData.store_info.length }}</text>
<text v-else>0</text>
/200
</view>
</view>
<view class="input_content_describe_textarea">
<textarea v-model="setFormData.store_info" style="width: 100%;" value=""
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" />
</view>
</view>
<!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view>
</view> -->
</view>
<!-- <view class="input_content">
<view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view>
<view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value=""
placeholder="不限量" /></view>
</view>
</view> -->
<view class="radio">
<view class="radio_label ">送货方式</view>
<checkbox-group class="select_group flex_start" @change="changeDelivery">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value"
:checked="setFormData.delivery_way.includes(val.value+'')" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</block>
</view>
</view>
<view class="handle">
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
<!-- 图片选择器 -->
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
</avatar>
</view>
</template>
<script>
import {
TOKENNAME,
HTTP_REQUEST_URL
} from '@/config/app.js';
import {
categoryBrandlist,
categorySelect,
storeClassifyLst,
categoryList,
attrList,
templateList,
productDetail,
getDeliveryType,
productCreate,
productUpdate
} from '@/api/product.js';
import {
serialize,
Toast,
Loading,
hideLoading,
Modal
} from "@/libs/uniApi.js";
import avatar from "@/components/yq-avatar/yq-avatar.vue";
import platfrom from "./components/platform.vue";
import storeClassification from '../components/store_classification.vue';
import commodityComponent from "./components/commodity.vue";
import priceComponent from "./components/price.vue";
export default {
components: {
avatar,
platfrom,
commodityComponent,
priceComponent,
storeClassification
},
data() {
return {
bar_code_dis: false,
merId: '', //id
product_id: '', //id
import: 0, //
code: '', //
show: false, //
image: false, //
setFormData: {
store_name: '',
imageList: [],
attrValue: [],
cate_name: '', //
unit_name: '', //
cate_id: '', // id
mer_cate_id: '', //
mer_cate_name: '', //
spec_type: '0', // 0. 1
attr: [], //
specifica: '', //
// setSpecificaValue: '', //
// setSpecificaValue2: '',
delivery_way: ['1', '2'], // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '', //
once_min_count: '', //
},
platformClassificationData: [], //
merchantClassification: [], //
brand: [], //
showCommodity: false, // ,
deliveryFreeList: [{
value: '1',
name: '到店核销'
},
{
value: '2',
name: '快递配送'
}
],
//
classified: {
cate_id: [],
mer_cate_id: [],
brand_id: [],
attr: [],
temp_id: []
},
productItem: {} || [],
showSpecType: false, //
spec_type: 0, //,0,1
};
},
onLoad(opt) {
this.merId = Number(opt.mer_id);
this.product_id = opt.product_id;
this.import = opt.import;
// if (!opt.product_id) this.showCommodity = true;
this.showCommodity = true;
this.initData();
if (this.import == 1) {
this.getOpenerEventChannel().once('importAttrValue', (e) => {
this.attrValue = e.attrValue;
uni.setStorageSync('attrValue', JSON.stringify(e.attrValue));
this.attr = e.attr;
uni.setStorageSync('attr', JSON.stringify(e.attr));
this.setFormData = Object.assign({}, this.setFormData, e);
this.$nextTick(() => {
this.$refs.commodityRef?.setDatas({
addGoodsSecoundData: {
is_good: this.setFormData.is_good, //
is_gift_bag: this.setFormData.is_gift_bag,
sort: this.setFormData.sort,
once_count: this.setFormData.once_count, //
video_link: this.setFormData.video_link,
},
goodsDis: {
store_name: this.setFormData.content?.title,
imageList: this.setFormData.content?.image
}
})
})
})
} else if (this.product_id) {
this.initDataEditData();
}
},
onBackPress() {},
onShow() {
this.initClasiffy();
// this.setFormData = Object.assign(this.setFormData, {
// "store_name": "",
// "imageList": [
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/457c6202311181745387896.jpeg",
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/185e2202311181745434402.jpeg"
// ],
// "cate_name": "",
// "unit_name": "",
// "cate_id": 445,
// "keyword": "22"
// })
// this.$nextTick(async () => {
// await this.$u.sleep(200)
// this.$refs.commodityRef.addGoodsSecoundData = {
// "is_good": 1,
// "is_gift_bag": 0,
// "sort": "20",
// "once_count": "",
// "video_link": "https://lihai001.oss-cn-chengdu.aliyuncs.com/media/7ce3d202311181816166215.mp4"
// }
// this.$refs.commodityRef.goodsDis = {
// "store_name": "",
// "imageList": [
// "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/fb73d202311181751262661.png"
// ]
// }
// this.$refs.priceRef.singleSpecification = {
// "price": "1",
// "cost": "1",
// "stock": "11",
// "ot_price": "",
// "wholesale_price": "",
// "bar_code": "666",
// "weight": "10",
// "volume": "5",
// "image": "",
// "extension_one": "",
// "extension_two": ""
// }
// })
},
beforeDestroy() {},
watch: {
'setFormData.imageList'(val) {
this.setFormData.image = val.length ? val[0] : '';
this.setFormData.slider_image = val.length ? serialize(val).splice(1) : [];
}
},
methods: {
changeDelivery(e) {
this.setFormData.delivery_way = e.detail.value;
},
//
initDataEditData() {
this.setFormData = {
imageList: [],
attrValue: [],
specification: '',
image: '', //
slider_image: '', //
store_name: '', //
store_info: '', //
keyword: '', //
brand_id: '', // id
brand_name: '', //
cate_id: '', //
cate_name: '', //
mer_cate_id: '', //
mer_cate_name: '', //
unit_name: '', //
spec_type: '0', // 0. 1
attr: [], //
specifica: '', //
// setSpecificaValue: '', //
// setSpecificaValue2: '', //
delivery_way: [], // 1 2
delivery_free: '0', // 0 1
temp_id: '', // ID
tempName: '', //
once_min_count: '', //
};
productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true;
if (res.data.content_arr && res.data.content_arr.length > 0) res.data.content = res.data
.content_arr;
let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item];
});
this.setFormData.product_id = this.product_id;
this.setFormData.imageList = [...(this.setFormData.image ? [this.setFormData.image] : []),
...
this
.setFormData.slider_image
];
this.setFormData.cate_name = editGoodsDetils?.storeCategory?.cate_name; //
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
item => item
.category && item.category.cate_name).join(',') : '';
this.setFormData.brand_name = editGoodsDetils.brand ? editGoodsDetils.brand.brand_name :
'';
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(
res.data
.content);
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
this.setFormData.delivery_way = res.data.delivery_way;
//
this.$nextTick(() => {
this.$refs.commodityRef.setDatas({
addGoodsSecoundData: {
is_good: res.data.is_good, //
is_gift_bag: res.data.is_gift_bag,
sort: res.data.sort,
once_count: res.data.once_count, //
video_link: res.data.video_link,
},
goodsDis: {
store_name: res.data.content?.title,
imageList: res.data.content?.image
}
})
//
if (this.setFormData.spec_type == 0) {
this.$refs.priceRef.setDatas(res.data.attrValue[0]);
}
})
editGoodsDetils.temp && (this.setFormData.tempName = editGoodsDetils.temp.name);
hideLoading();
});
},
//
async initClasiffy() {
this.merchantClassification = (await storeClassifyLst(this.merId)).data;
},
initData() {
//
categoryBrandlist(this.merId).then((res) => {
this.brand = res.data;
}).catch(e => {
console.log(e);
});
//
categoryList(this.merId).then((res) => {
res.data.forEach((item1) => {
item1.children.forEach((item2) => {
item2.children = null;
})
})
this.platformClassificationData = res.data;
}).catch(e => {
console.log(e);
})
},
//
updateCode(e) {
this.code = e + '';
},
//
handleChooseImage() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.setFormData.imageList.push(res.data.path);
});
},
clk() {
// let avatar = this.$refs.avatar;
// avatar.fChooseImg(1, {
// selWidth: '350upx',
// selHeight: '350upx',
// inner: true
// });
this.$util.uploadImageOne({
url: 'upload/image',
crop: {
width: 2000,
height: 2000,
}
}, (res) => {
this.setFormData.imageList.push(res.data.path);
});
},
doUpload(rsp) {
let that = this
// console.log(rsp);
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/upload/image/field',
filePath: rsp.path,
name: 'field',
formData: {
'filename': rsp.path,
'name': that.imgName
},
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + this.$store.state.app.token
},
success: (uploadFileRes) => {
// console.log(uploadFileRes.data);
let imgData = JSON.parse(uploadFileRes.data)
that.setFormData.imageList.push(imgData.data.path)
},
complete(res) {
// console.log(res)
}
});
},
getImgName(name) {
this.imgName = name
},
//
pop(e) {
this.show = true
this.image = e
},
//
close() {
this.$refs.select_popup.close();
this.show = false
},
//
deleteImage(index) {
this.setFormData.imageList.splice(index, 1);
},
//
selectPlatform() {
this.$refs.select_platform.open();
},
//
closePlatfrom() {
this.$refs.select_platform.close();
},
//
getPlatData(item, taplist) {
this.setFormData.cate_id = item.value;
this.setFormData.cate_name = item.label;
this.$refs.select_platform.close();
},
//
selectStoreClass() {
this.$refs.select_store.open();
},
//
merchantClose() {
this.$refs.select_store.close();
},
//
handleGetSelectStore(item) {
console.log(item);
this.setFormData.mer_cate_id = item.map(val => val.store_category_id);
this.setFormData.mer_cate_name = item.map(val => val.cate_name).join(',');
this.$refs.select_store.close();
},
//
selectBrand() {
this.$refs.select_popup.open();
},
//
getLinkageData(item) {
this.setFormData.brand_id = item[0].value;
this.setFormData.brand_name = item[0].cate_name;
this.$refs.select_popup.close();
},
//
multipleList(data, model) {
if (model == 'mer_cate_id') {
this.platformClassification[1].value = data.map(item => item.label).join('');
this.platformClassification[1].allreadySelect = data;
this.setFormData.mer_cate_id = data.map(item => item.value);
}
},
// popup
//
close() {
this.$refs.select_popup.close();
this.show = false
},
//
getLinkDataOfRecursion(arr, child = 'children', key = 'value') {
let str = '';
let id = '';
arr.forEach(item => {
str = item.label;
id = item.value;
});
// str = str.slice(0, str.length - 1);
return {
str,
id
};
},
//
getTemplateList() {
templateList(this.merId, this.templateListPage).then(res => {
res.data.list.forEach(item => {
this.$set(item, 'value', item.shipping_template_id);
this.$set(item, 'label', item.name);
});
this.classified['temp_id'] = res.data.list;
this.$refs.tempId.open();
});
},
//
submitCreatedGoods() {
console.log('创建商品');
// return console.log('', this.setFormData.attr);
console.log('是否推荐', this.$refs.commodityRef.addGoodsSecoundData);
console.log('商品详情', this.$refs.commodityRef.goodsDis, this.$refs.commodityRef.store_name);
if (this.setFormData.spec_type == 0) {
console.log('价格库存', this.$refs.priceRef.singleSpecification);
}
if (this.setFormData.delivery_way.length == 0) return Toast('请至少选择一种送货方式');
let postData = {
...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData,
content: {
title: this.$refs.commodityRef.goodsDis?.store_name || '',
image: this.$refs.commodityRef.goodsDis?.imageList || []
},
video_link: this.$refs.commodityRef.addGoodsSecoundData.video_link,
};
if (this.setFormData.spec_type == 0) {
postData.attrValue = [this.$refs.priceRef.singleSpecification];
} else postData.attrValue = this.setFormData.attrValue;
postData.stock = postData.attrValue[0]?.stock || 0;
if (!postData.store_name || postData.store_name?.trim().length <= 0) return Toast('请输入商品名称');
if (!postData.imageList || postData.imageList?.length < 2) return Toast('请上传2张以上商品图片');
if (!postData.cate_name || postData.cate_name?.trim().length <= 0) return Toast('请选择平台分类');
if (!postData.unit_name || postData.unit_name?.trim().length <= 0) return Toast('请输入商品单位');
let userInfo = this.$store.state.app.userInfo;
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = '';
console.log(postData);
postData.attrValue.forEach(t => {
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
showFlag = '批发价不能小于0'
}
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
if (!t.stock || +t.stock <= 0) showFlag = '库存不能小于0';
// if (!t.cost || +t.cost <= 0) showFlag = '0';
})
if (showFlag) {
if (this.setFormData.spec_type == 1) showFlag += ', 请点击设置多规格设置';
return Toast(showFlag);
}
Loading();
if (this.product_id) {
productUpdate(this.merId, this.product_id, postData)
.then(res => {
hideLoading()
Modal('提交成功', '点击确定, 前往商品列表页面').then(() => {
uni.redirectTo({
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(() => {
uni.navigateBack()
})
})
.catch(rej => {
Toast(rej);
});
} else {
productCreate(this.merId, postData)
.then(res => {
hideLoading();
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack();
} else uni.redirectTo({
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(() => {
uni.navigateBack()
})
})
.catch(rej => {
Toast(rej);
});
}
},
//
changeSpecType(e) {
if (this.setFormData.spec_type != e.detail.value) {
this.showSpecType = true;
}
this.spec_type = e.detail.value;
},
//
changeSpecType2() {
this.showSpecType = false;
this.setFormData.spec_type = this.spec_type + '';
this.setFormData.attrValue = [];
this.setFormData.attr = [];
},
//
navToSpecGood() {
uni.navigateTo({
url: '/pages/product/addGood/specGood?product_id=' + this.product_id,
success: (e) => {
// console.log(this.setFormData.attrValue, e);
e.eventChannel.emit('updateAttrValue', {
attrValue: JSON.parse(JSON.stringify(this.setFormData.attrValue)),
attr: JSON.parse(JSON.stringify(this.setFormData.attr))
});
uni.$once('updateSpecType', (e) => {
this.setFormData.attrValue = JSON.parse(JSON.stringify(e.attrValue));
this.setFormData.attr = JSON.parse(JSON.stringify(e.attr));
})
}
})
}
}
};
</script>
<style lang="scss" scoped>
@import './scss/index.scss';
.pop {
z-index: 1;
}
.guanbi {
width: 20px;
height: 20px;
margin: 30px auto;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,77 @@
<template>
<view class="">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="10"></u-upload>
</view>
</template>
<script>
import {
TOKENNAME,
HTTP_REQUEST_URL
} from '@/config/app.js';
export default {
data() {
return {
fileList1: [],
}
},
methods: {
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/upload/image/field',
filePath: url,
// formData: {
// 'filename': rsp.path,
// 'name': that.imgName
// },
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + this.$store.state.app.token
},
success: (res) => {
setTimeout(() => {
resolve(res.data.data)
}, 1000)
}
});
})
},
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,941 @@
<template>
<view class='content'>
<u--form :model="formData" :rules="rules" ref="formData" :labelStyle="{fontSize:'32rpx',color:'#444444'}"
labelWidth='auto'>
<view class="good-baseInfo card">
<u-form-item label="商品标题" prop="store_name" ref="item1" required>
<text slot='right'
style="font-size:28rpx ; color:#989898 ;">{{stroeNameLength}}/{{maxLength}}</text>
</u-form-item>
<u-form-item label="" prop="userInfo.name" ref="item1">
<u--textarea v-model="formData.store_name" placeholder="建议描述产品品牌、名称、规格、口味"
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='maxLength'></u--textarea>
</u-form-item>
<u-form-item label="商品主图" prop="formData.imageList" ref="item1" required>
<text style="color: #E18C34;font-size: 24rpx">上传时应注重真实性清晰度</text>
</u-form-item>
<view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;">
<view class="" style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in formData.imageList"
style="margin-right: 20rpx;margin-bottom: 20rpx;">
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
<view class="video_list_item photo" style="position: relative;">
<view class="jiao">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="item"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class="" style="position: relative;">
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
<view class="image-play-icon">
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
</view>
</view>
<!--#endif-->
<image @click="formData.imageList.splice(index,1)"
src="@/static/images/gban.png" mode="widthFix"></image>
</view>
<view style="position: absolute;top: 20rpx;z-index: 99;width: 140rpx;height: 100%;"
@click="videoshow(index)">
<view class="videoHover">
</view>
</view>
</view>
</view>
<view class="" style="position: relative;" v-else>
<view class="jiao" @click="formData.imageList.splice(index,1)">
<image src="@/static/images/gban.png" mode="widthFix"></image>
</view>
<u--image @click="preViewImg(item)" :src="item" :fade="true" duration="450"
width='140rpx' height='140rpx'></u--image>
</view>
</view>
<view class='uploadimg' @click="show=true,isDetail=false">
<u-icon name="plus" color="#777777"></u-icon>
<view class="" style="color: #777777;font-size: 20rpx;">
上传图片/视频
</view>
</view>
</view>
</view>
<u-form-item label="商品详情" prop="formData.content.image" required>
<text style="color: #E18C34;font-size: 24rpx">上传时应注重真实性清晰度</text>
</u-form-item>
<view class="card" style="min-height: 150rpx;margin-bottom: 0;padding: 0;">
<view class="" style="display: flex;flex-wrap: wrap;">
<view v-for="(item,index) in formData.content.image"
style="margin-right: 20rpx;margin-bottom: 20rpx;">
<view class="video_list" v-if='vidioTypeList.includes(getSuffix(item))'>
<view class="video_list_item photo" style="position: relative;">
<view class="jiao" @click="formData.content.image.splice(index,1)">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="item"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class="" style="position: relative;">
<img :src="item+coverUrl" style=" width:140rpx;height: 140rpx;"></img>
<view class="image-play-icon">
<u-icon name="play-right-fill" size="30" color="white"></u-icon>
</view>
</view>
<!--#endif-->
<image src="@/static/images/gban.png" mode="widthFix"></image>
</view>
<view style="position: absolute;top: 20rpx;z-index: 99;width: 140rpx;height: 100%;"
@click="videoshow(index)">
<view class="videoHover">
</view>
</view>
</view>
</view>
<view class="" style="position: relative;" v-else>
<view class="jiao" @click="formData.content.image.splice(index,1)">
<image src="@/static/images/gban.png" mode="widthFix"></image>
</view>
<u--image @click="preViewImg(item)" :src="item" :fade="true" duration="450"
width='140rpx' height='140rpx'></u--image>
</view>
</view>
<view class='uploadimg' @click="show=true,isDetail=true">
<u-icon name="plus" color="#777777"></u-icon>
<view class="" style="color: #777777;font-size: 20rpx;">
上传图片/视频
</view>
</view>
</view>
</view>
</view>
<view class='tips'>
商品类目属性
</view>
<view class="card" style="padding: 14rpx 30rpx;">
<u-form-item label="商品分类" prop="cate_name" ref="item1" labelPosition="left" required>
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="navgo(`/pages/product/addGoodDetail/goodsType?mer_id=${mer_id}&&formData=${JSON.stringify(formData)}`)">
<view style="margin-right: 10rpx;line-height: 25rpx;">{{ formData.cate_name|| '请选择'}}</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item label="商品属性" prop="userInfo.name" ref="item1" labelPosition="left">
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="navgo(`/pages/product/addGoodDetail/goodsAttr?mer_id=${mer_id}&&formData=${JSON.stringify(formData)}`)">
<view style="margin-right: 10rpx;line-height: 25rpx;">
{{isSet(formData.product_attribute)?'已设置':'未设置' }}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
</view>
<view class='tips'>
规格与价格
</view>
<view class="card" style="min-height: 100rpx;padding: 14rpx 30rpx;">
<u-form-item label="规格与价格" prop="formData.attrValue" ref="item1" labelPosition="left" required>
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="navgo(`/pages/product/addGoodDetail/goodsPrice?formData=${JSON.stringify(formData)}&&mer_id=${mer_id}`)">
<view style="margin-right: 10rpx;line-height: 25rpx;">{{sets?"已设置":""}}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<view class="" v-if="showSet">
<view class="" v-for="(item,index) in formData.attrValue.filter(item=> item.is_use==0)">
<view class="" v-if='formData.attrValue.filter(item=> item.is_use==0).length==1'>
<u-form-item label="零售价格" label-width="auto" labelPosition="left" border-bottom>
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
{{item.price}}/{{item.unit_name}}
</view>
</u-form-item>
<u-form-item v-if='isWholeSale' label="批发价格" label-width="auto" labelPosition="left"
border-bottom>
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
{{item.wholesale_price}}/{{item.wholesale_unit_name}}
</view>
</u-form-item>
<u-form-item label="商品库存" label-width="auto" labelPosition="left" border-bottom>
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
{{item.stock}}
</view>
</u-form-item>
</view>
<view class="" v-else>
<u-form-item :label="item.sku" label-width="350rpx" prop="userInfo.name" ref="item1"
labelPosition="left" border-bottom>
<view class="" style="display: flex;justify-content: space-between;width: 100%">
<view style="font-size: 28rpx;color:#777777 ;">
零售价
</view>
<view style="font-size: 28rpx;color:#777777 ;">
{{item.price}}/{{item.unit_name}}
</view>
</view>
</u-form-item>
<u-form-item label=" " label-width="350rpx" prop="userInfo.name" ref="item1"
labelPosition="left" border-bottom v-if='isWholeSale'>
<view class="" style="display: flex;justify-content: space-between;width: 100%">
<view style="font-size: 28rpx;color:#777777 ;">
批发价
</view>
<view style="font-size: 28rpx;color:#777777 ;">
{{item.wholesale_price}}/{{item.wholesale_unit_name}}
</view>
</view>
</u-form-item>
</view>
</view>
</view>
</view>
<view class='tips'>
</view>
<view class="card" style="padding: 14rpx 30rpx;">
<u-form-item label="商品详细描述" prop="userInfo.name" ref="item1" labelPosition="left">
<text slot='right' style="font-size:28rpx ; color:#989898 ;">{{storeInfoLength}}/{{300}}</text>
</u-form-item>
<u--textarea v-model="formData.store_info" placeholder="货品描述请严格遵循《广告法》规定,避免出现虚假宣传和误导消费者的词语"
style="background-color: #F9F9F9;height: 166rpx;" :maxlength='300'></u--textarea>
<u-line color="#F3F3F3" style="margin: 30rpx 0;"></u-line>
<u-form-item label="送货方式" labelPosition="left" prop='delivery_way' required>
<u-checkbox-group v-model="formData.delivery_way" placement="row" slot="right">
<u-checkbox shape="circle" v-for="(item, index) in checkboxList1" :key="index"
:label="item.name" :name="item.value" activeColor="#20B128"
:customStyle="{marginRight: '8px'}"
:labelColor="checkboxValue1.includes(item.name)?'#20B128':'#777777'">
</u-checkbox>
</u-checkbox-group>
</u-form-item>
</view>
</u--form>
<view class="submit-btn">
<u-button text="确认发布" @click="submit" color="#33BB3C" class="custom-style"></u-button>
</view>
<view class="overlay">
<u-overlay :show="showlay">
<view class="overlay-content">
<view class="">
温馨提示
</view>
<view class="" style="font-size: 36rpx;">
发布中断可能导致商机流失
</view>
<view class="" style="font-size: 26rpx;color: #777777;">
<view class="">
您的商品信息已经填写了大半
</view>
<view class="">
只差最后几步就能上架销售了
</view>
</view>
<view class=""
style="font-size: 28rpx;color: #444444;background-color: #EDF8ED;padding: 20rpx 44rpx;border-radius: 12rpx;">
<view class="">
越早发布产品<text style='color: #21B129;'>曝光量越高</text>
</view>
<view class="">
越早发布产品可提前 <text style='color: #21B129;'>抢占商机</text>
</view>
</view>
<view style="display: flex;">
<view style="width: 236rpx;height: 84rpx;margin-right: 30rpx;">
<u-button text="确定返回" @click='back'></u-button>
</view>
<view style="width: 236rpx;height: 84rpx;">
<u-button type='primary' text="继续编辑" @click='showlay=false'></u-button>
</view>
</view>
</view>
</u-overlay>
</view>
<u-picker :show="show" :columns="columns" confirmColor='#33BB3C' @close='show=false' @confirm='choseMedia'
@cancel='show=false'></u-picker>
<view v-if="showVideo" class="video-count">
<video id="myVideo" class="videoLink" autoplay loop muted
:src=" isDetail?formData.content.image[videoIndex]: formData.imageList[videoIndex]"></video>
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
</view>
</template>
<script>
import {
Toast,
Modal
} from "@/libs/uniApi.js";
import {
HTTP_REQUEST_URL,
TOKENNAME
} from '@/config/app.js';
import store from 'store';
import {
productCreate,
productUpdate,
productDetail
} from '@/api/product.js';
import uploadImgVideo from "../addGood/components/uploadImgVideo.vue"
import form from "../../../uni_modules/uview-ui/libs/config/props/form";
export default {
components: {
uploadImgVideo,
},
data() {
return {
coverUrl: '?spm=a2c4e.11153940.blogcont573781.6.c1032027sQ46VG&x-oss-process=video/snapshot,t_1000,m_fast',
mode: 'add',
isDetail: false,
columns: [
['图片', '视频', ]
],
sets: false,
showVideo: false,
vidioTypeList: ['mp4', 'avi', 'mov', 'wmv', 'mkv', 'flv', 'mpeg', '3gp', 'webm'],
videoIndex: 0,
upload_max: 100,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
show: false, //
showSet: false,
delivery_way: [],
isWholeSale: false,
formData: {
store_info: "",
product_id: "",
"store_name": "",
"imageList": [
],
attr: [{
detail: [{
attr: 'name'
}],
value: " "
}, ],
"attrValue": [{
detail: {
},
"price": "",
"unit_name": "",
"wholesale_unit_name": "",
"wholesale_price": '',
"cost": "",
"stock": "",
sku: '',
"ot_price": "",
"procure_price": "",
"bar_code": "",
"weight": "",
"extension_one": "",
"extension_two": "",
uuid: "",
volume: "",
"is_use": 0,
}],
"cate_name": "",
"unit_name": "",
"cate_id": '',
"mer_cate_id": [
],
"mer_cate_name": "",
"spec_type": "",
"specifica": "",
"delivery_way": [
],
"delivery_free": "1",
"temp_id": "",
"tempName": "",
"once_min_count": "",
"image": "",
"slider_image": [
""
],
"is_good": 0,
"is_gift_bag": 0,
"sort": "",
"once_count": "",
"video_link": "",
"content": {
"title": "",
"image": []
},
"stock": "",
product_attribute: {
address: "",
leval: "",
pack: "",
attr: [{
label: "",
value: ''
}]
}
},
mer_id: "",
maxLength: 30,
fileList6: [],
showSex: false,
showlay: false,
go: true,
model1: {
userInfo: {
name: '',
sex: '',
},
},
range: [{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
],
text: "",
text1: "",
value1: "",
checkboxValue1: [],
checkboxList1: [{
name: '到店核销',
value: '1',
},
{
name: '快递配送',
value: '2',
},
],
attrRules: {
price: '单价不能为空',
unit_name: '计量单位不能为空',
wholesale_price: '批发价格不能为空',
wholesale_unit_name: '批发单位不能为空',
stock: '库存不能为空'
},
rules: {
"formData.imageList": [{
validator: (rule, value, callback) => {
return this.formData.imageList.length >= 2
},
message: '请至少上传2张图片',
trigger: ['change', 'blur'],
}],
"formData.attrValue": [{
validator: (rule, value, callback) => {
if (!this.isWholeSale) {
delete this.attrRules.wholesale_unit_name
delete this.attrRules.wholesale_price
}
let errList = []
this.formData.attrValue.forEach(item => {
for (let key in this.attrRules) {
if (!item[key]) {
errList.push(this.rules[key])
}
}
})
return errList.length == 0
},
message: '请填写完整商品规格',
trigger: ['change', 'blur'],
}],
'store_name': {
type: 'string',
required: true,
message: '请填写商品标题',
trigger: ['blur', 'change']
},
'cate_name': {
type: 'string',
required: true,
message: '请填写商品分类',
trigger: ['blur', 'change']
},
'delivery_way': {
validator: (rule, value, callback) => {
return this.formData.delivery_way.length > 0
},
required: true,
message: '请选择送货方式',
trigger: ['blur', 'change']
},
'formData.content.image': {
validator: (rule, value, callback) => {
return this.formData.content.image.length > 0
},
required: true,
message: '请上传商品详情图',
trigger: ['blur', 'change']
},
},
radio: '',
switchVal: false
};
},
computed: {
stroeNameLength() {
return this.formData.store_name?.length || 0
},
storeInfoLength() {
return this.formData.store_info?.length || 0
}
},
methods: {
test(index) {
// this.formData.imageList.splice(index, 1)
console.log(this.formData, index)
},
preViewImg(url) {
let that = this
uni.previewImage({
urls: [url],
});
},
deleteImage(index) {
// this.addGoodsSecoundData.video_link = '';
},
videoshow(index) {
this.videoIndex = index
this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
},
getSuffix(url) {
const str = url;
const lastIndex = str.lastIndexOf(".");
if (lastIndex !== -1) {
const extension = str.substring(lastIndex + 1);
return extension
} else {
return 'asdasdsadsd'
}
},
choseMedia(e) {
console.log(e.value)
this.show = false
if (e.value[0] == '图片') {
this.handleChooseImage()
} else {
this.uploadVideo()
}
},
//
handleChooseImage() {
let that = this;
that.$util.uploadImages({
count: 6,
url: 'upload/image'
}, function(res) {
if (that.isDetail) {
that.formData.content.image.push(res.data.path.replace(
/\\/g, ""));
} else {
that.$set(that.formData.imageList, that.formData.imageList.length, res.data.path.replace(
/\\/g,
""));
}
// that.formData.imageList.push(res.data.path);
});
},
//
uploadVideo() {
let that = this
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: res => {
uni.showLoading({
title: '正在上传中。。。'
});
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({
url: this.uploadUrl, //
filePath: res.tempFilePath,
name: 'file',
header: {
// #ifdef MP
'Content-Type': 'multipart/form-data',
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: uploadFileRes => {
uni.hideLoading();
let data = JSON.parse(uploadFileRes.data);
if (that.isDetail) {
that.formData.content.image.push(data.data.src.replace(
/\\/g, ""));
} else {
that.formData.imageList.push(data.data.src.replace(/\\/g,
""))
}
},
complete: a => {
// console.log(a);
}
});
} else {
uni.showModal({
title: '提示',
content: `视频超出限制${this.upload_max}MB,已过滤`
});
}
},
fail: err => {
console.log(err)
}
});
},
isSet(obj) {
for (let key in obj) {
if (typeof obj[key] == 'object') this.isSet(obj[key])
else {
if (Boolean(obj[key])) return 'true12';
}
}
},
isSet2(obj) {
let lists = ['unit_name', 'price', 'wholesale_price', 'stock']
lists.forEach(item => {
if (Boolean(this.formData.attrValue[0][item])) {
this.sets = true
}
})
},
sexSelect(e) {
this.model1.userInfo.sex = e.name
this.$refs.uForm.validateField('userInfo.sex')
},
navgo(url) {
uni.navigateTo({
url
})
},
back() {
// console.log('show')
this.go = false
uni.navigateBack()
},
showlayFn() {
uni.navigateBack()
},
// submit() {
// console.log(this.formData)
// },
getAttr(object) {
this.formData.product_attribute = object
},
getAttrValue(object) {
this.formData.attrValue = object
},
async handAdd() {
let that = this
let data = uni.$u.deepClone(this.formData)
data.image = data.imageList.find(item => {
return !this.vidioTypeList.includes(this.getSuffix(item))
})
data.slider_image = this.formData.imageList.filter((item, index) => index != 0)
that.formData.product_id ?
productUpdate(that.mer_id, that.formData.product_id, data)
.then(res => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack();
} else {
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${that.mer_id}&type=6`
})
}
}).catch(() => {
uni.navigateBack()
})
})
.catch(rej => {
// Toast(rej);
}) :
productCreate(that.mer_id, data)
.then(res => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
})
} else {
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
})
}
}).catch(() => {
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
})
})
})
.catch(rej => {
// Toast(rej);
})
},
submit() {
// console.log(this.formData)
this.$refs.formData.validate().then(res => {
this.handAdd()
}).catch(errors => {
// console.log(errors)
uni.$u.toast(errors[0].message)
})
},
oldToNew(formData) {
if (formData.attr.length <= 1) return
formData.attr.splice(1, 999)
formData.attr[0].value = ' '
formData.attr[0].detail = formData.attrValue.map(item => item.sku)
formData.attrValue.forEach((item, index) => {
item.detail = {}
item.detail[' '] = formData.attr[0].detail[index]
})
this.formData = formData
},
initFormData(option) {
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
this.mer_id = option.mer_id
if (option.formData) {
this.formData = JSON.parse(option.formData)
}
if (option.goodsInfo) {
let goods = JSON.parse(option.goodsInfo)
console.log(goods)
this.formData.store_name = goods.store_name
this.formData.imageList = [goods.image, ...goods.slider_image]
console.log(this.formData)
}
}
},
onLoad(option) {
// let that = this
this.initFormData(option)
this.showSet = option.showSet ? JSON.parse(option.showSet) : this.showSet
this.isSet2()
this.formData.delivery_way = this.$store.state.app.userInfo?.mer_info.delivery_way.split(',')
if (option.product_id) {
this.formData.product_id = option.product_id
this.mode = 'edit'
this.showSet = true
productDetail(option.mer_id, option.product_id).then(res => {
Object.assign(this.formData, res.data)
this.$set(this.formData, "imageList", res.data.image_list)
this.formData.product_attribute = JSON.parse(this.formData.product_attribute)
this.formData.cate_name = this.formData.storeCategory.cate_name
this.formData.cate_id = this.formData.storeCategory.store_category_id
delete this.formData.image_list
if (!this.formData.imageList) this.formData.imageList = []
this.oldToNew(this.formData)
console.log(this.formData, 'formDATA')
})
}
},
onBackPress: function(e) {
this.showlay = true
return this.go;
}
};
</script>
<style lang='scss'>
.content {
width: 100vw;
min-height: 100vh;
background-color: #F1F1F1;
box-sizing: border-box;
padding-bottom: 280rpx;
padding: 20rpx 20rpx 200rpx 20rpx;
.card {
background-color: white;
padding: 28rpx 30rpx;
border-radius: 12rpx;
margin-bottom: 30rpx;
}
.uploadimg {
width: 140rpx;
height: 140rpx;
border-radius: 16rpx;
border: 2rpx solid #F1F1F1;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
box-sizing: border-box;
padding: 20rpx 0;
overflow: hidden;
}
.tips {
color: #777777;
font-size: 28rpx;
margin: 30rpx 0;
}
.submit-btn {
position: fixed;
bottom: 50rpx;
left: 50%;
transform: translate(-50%, 0);
width: 670rpx;
border-radius: 40rpx;
overflow: hidden;
}
}
.overlay-content {
width: 570rpx;
height: 640rpx;
box-sizing: border-box;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 16rpx;
background-image: url('/static/images/addGodd/addGoodBg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 70rpx 0 40rpx 0;
}
.jiao {
image {
position: absolute;
top: -14rpx;
right: -14rpx;
width: 50rpx;
height: 50rpx;
border-radius: 50%;
padding: 8rpx;
z-index: 2;
}
video {
width: 140rpx;
height: 140rpx;
}
}
.preview_video {
position: absolute;
background-color: red;
}
.content_list_video {
min-height: 154rpx;
padding: 23rpx 10rpx;
display: flex;
justify-content: space-between;
.content_list_video_title {
/* padding-top: 10rpx; */
}
}
.video-count {
position: fixed;
width: 600rpx;
height: 500rpx;
top: 50%;
left: 50%;
margin-left: -300rpx;
margin-top: -250rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
.videoLink {
width: 600rpx;
height: 500rpx;
}
}
.video-text {
color: red;
font-size: 24rpx;
text-align: center;
/* position: absolute; */
}
.image-play-icon {
background-color: rgba(0, 0, 0, 0.3);
width: 140rpx;
height: 140rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
justify-content: space-around;
}
</style>

View File

@ -0,0 +1,512 @@
<template>
<view class="content">
<u--form :model="model1" ref="uForm" labelPosition="left" :labelStyle="{fontSize:'32rpx',color:'#444444'}"
labelWidth='120' borderBottom>
<view class="description">
产品属性
</view>
<view class="label-cls">
<u-form-item label="产地" prop="userInfo.name" ref="item1">
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="showPouple=true,popType='place',getLocation()">
<view style="margin-right: 10rpx;line-height: 25rpx;">
{{formData.product_attribute.address||'请选择'}}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item label="商品等级" prop="userInfo.name" ref="item1">
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="showPouple=true,popType='leval'">
<view style="margin-right: 10rpx;line-height: 25rpx;">
{{formData.product_attribute.leval||'请选择'}}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item label="货品包装" prop="userInfo.name" ref="item1">
<view style="display: flex;align-items: center;font-size: 28rpx;color:#777777 ;" slot="right"
@click="showPouple=true,popType='packing'">
<view style="margin-right: 10rpx;line-height: 25rpx;">{{formData.product_attribute.pack||'请选择'}}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
</view>
<view class="description" style="display: flex;justify-content: space-between;align-items: center">
<text>产品属性</text>
<view class="attr-custom" @click="formData.product_attribute.attr.push({label:'',value:''})">
<u-icon name="plus" color='#20B128' style="margin-right: 8rpx;font-weight: bold;"></u-icon>
</view>
</view>
<view class="label-cls"
style="display: flex;padding: 20rpx 20rpx 20rpx 2rpx;justify-content: space-between;margin-bottom: 30rpx;"
v-for="(item,index) in formData.product_attribute.attr">
<view class="" style="display: flex;width: 70%;align-items: center;">
<u--input placeholder="请填写属性名称" border="surround" v-model="item.label"></u--input>
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
<u--input placeholder="请填写属性值" border="surround" v-model="item.value"></u--input>
<u-line direction="col" length="40rpx" color="#CECECE"></u-line>
</view>
<view style="color: #777777;display: flex; align-items: center;"
@click="formData.product_attribute.attr.splice(index, 1);">
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon>
</view>
</view>
</u--form>
<view class="submit-btn">
<u-button type="primary" shape="circle" text="保存" @click="submit"></u-button>
</view>
<u-popup :show="showPouple" @close="showPouple=false,positionType=0" @open="showPouple=true" :round="10">
<view class="RegularFont" style="padding: 42rpx 40rpx">
<view class="pop-head">
<text v-if="popType=='place' || !show " @click="showPouple=false,positionType=0">取消</text>
<text v-else @click="show=false"><u-icon name="arrow-left" size="20"></u-icon></text>
<text
style="font-size:32rpx ;color:#333333 ;">{{popType=='place'?'商品产地': popType=='leval'?'商品等级':'商品包装' }}
</text>
<text @click="confirm">确定</text>
</view>
<!-- 地区 -->
<view v-if="popType=='place'">
<view class="Positioning " style="color: #989898;margin-bottom: 30rpx;">
<view class="" style="display: flex;" @click="confirm">
<u-icon name="map" style='margin-right: 8rpx;'></u-icon>
<text>{{(address.province+address.city+address.district )||errMag}} </text>
</view>
<view class="" @click="getLocation">
刷新定位
</view>
</view>
<u-line color="#CECECE"></u-line>
<view class="province">
<view class="province-li" @click='positionType=0,positionList=provinceList'
:style="{color:positionType==0?'#20B128':'#707070'} ">
{{address.province||'请选择' }}
</view>
<view class="province-li" @click='choseCity'
:style="{color:positionType==1?'#20B128':'#707070'} ">
{{address.city ||'请选择'}}
</view>
<view class="province-li" @click='choseArea'
:style="{color:positionType==2?'#20B128':'#707070'} ">
{{address.district ||'请选择'}}
</view>
<view class="province-line" :style="{left:positionType*130+30+'rpx'}" />
</view>
<u-line color="#CECECE"></u-line>
<view class="" style="color:#989898;font-size:24rpx ;margin-top: 40rpx;">
请选择
</view>
<view class="position-content">
<view class="position-li" :class="{act:address[wacthType()]==item.name}"
v-for="item in positionList" @click="chosePosition(item)">
<text>
{{item.name}}
</text>
<u-icon v-if='address[wacthType()]==item.name' name="checkbox-mark" color="#38BE41"
style='margin-left: 8rpx;'></u-icon>
</view>
</view>
</view>
<!-- 地区结束 -->
<!-- 商品等级 -->
<view v-if="popType=='leval'" style="height: 500rpx;">
<u-transition :show="!show" mode="slide-right">
<view class="goods-leval">
<view class="goods-leval-li" :class="{act:formData.product_attribute.leval==item}"
v-for='item in levalList'
@click="formData.product_attribute.leval=item,showPouple=false">
{{item}}
</view>
<view class="goods-leval-li " style="display: flex;color:#38BE41;" @click="show=true">
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon>
</view>
</view>
</u-transition>
<u-transition :show="show" mode="slide-left">
<view class="transition">
<u--textarea v-model="selfLeval" placeholder="请输入商品等级"></u--textarea>
</view>
</u-transition>
</view>
<!-- 商品等级结束 -->
<!-- 商品包装 -->
<view v-if="popType=='packing'" style="height: 500rpx;">
<u-transition :show="!show" mode="slide-right">
<view class="goods-leval">
<view class="goods-leval-li" :class="{act:formData.pack==item}" v-for='item in packList'
@click="formData.product_attribute.pack=item,showPouple=false">
{{item}}
</view>
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;" @click="show=true">
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon>
</view>
</view>
</u-transition>
<u-transition :show="show" mode="slide-left">
<view class="transition">
<u--textarea v-model="selfPack" placeholder="请输入商品等级"></u--textarea>
</view>
</u-transition>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
getGeocoder,
} from '@/api/store.js';
import {
getProvince,
getCity,
getArea
} from "@/api/common.js"
import {
formatDate
} from '../../../libs/uniApi';
export default {
data() {
return {
errMag: "",
provinceList: [],
cityList: [],
districtList: [],
positionList: [],
areaList: [],
districtList: [],
posType: {
},
selfLeval: "",
levalList: [
"优等品",
"一等品",
"合格品",
],
selfPack: "",
packList: [
"盒装",
"箱装",
"袋装",
"盆装",
"泡沫箱"
],
address: {
province: '',
province_code: '',
city: "",
city_code: "",
district: "",
district_code: ""
},
show: false,
popType: 'leval',
showPouple: false,
showSex: false,
positionType: 0,
data: {},
formData: {
// address: "",
// leval: "",
// pack: "",
// attr: [{
// label: "",
// value: ''
// }]
},
model1: {
userInfo: {
name: '',
sex: '',
},
},
};
},
methods: {
sexSelect(e) {
this.model1.userInfo.sex = e.name
this.$refs.uForm.validateField('userInfo.sex')
},
navgo(url) {
uni.navigateTo({
url
})
},
confirm() {
if (this.popType == 'place') {
this.formData.product_attribute.address = this.address.province + this.address.city + this.address
.district
} else if (this.popType == 'leval') {
this.levalList.push(this.selfLeval)
this.formData.product_attribute.leval = this.levalList[this.levalList.length - 1]
this.selfLeval = ''
} else if (this.popType == 'packing') {
this.packList.push(this.selfPack)
this.formData.pack = this.packList[this.packList.length - 1]
this.selfPack = ''
}
this.show = false
this.showPouple = false
},
chosePosition(item) {
if (this.positionType == 0) {
this.address.province = item.name
this.address.province_code = item.code
this.address.city = ''
this.address.district = ''
} else if (this.positionType == 1) {
this.address.city = item.name
this.address.city_code = item.code
this.address.district = ''
console.log(this.address)
} else {
this.address.district = item.name
this.address.district_code = item.code
}
},
wacthType() {
if (this.positionType == 0) return "province";
else if (this.positionType == 1) return "city";
else if (this.positionType == 2) return "district";
},
choseCity() {
this.positionType = 1;
getCity({
code: this.address.province_code
}).then(res => {
this.cityList = res.data
this.positionList = this.cityList
this.cityList.forEach(item => {
if (this.address.city == item.name) {
this.address.city_code = item.code
}
})
})
},
choseArea() {
this.positionType = 2;
console.log(this.address)
getArea({
city_code: this.address.city_code
}).then(res => {
this.areaList = res.data
this.positionList = this.areaList
})
},
getLocation() {
let that = this
uni.getLocation({
type: 'wgs84',
success: function(res) {
console.log(res, 'res')
getGeocoder({
lat: res.latitude,
long: res.longitude
}).then(res1 => {
that.address = res1.data.address_component
that.positionList = that.provinceList
that.provinceList.forEach(item => {
if (that.address.province == item.name) {
that.address.province_code = item.code
}
})
}).catch(err => {
console.log("获取位置失败")
uni.showToast({
title: err,
icon: 'none'
})
})
},
fail: function(err) {
that.errMag = "获取位置失败,请手动先择"
console.log('sad', err)
}
});
},
submit() {
let that = this
uni.redirectTo({
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }`
})
}
},
onLoad(option) {
getProvince().then(res => {
this.provinceList = res.data
this.positionList = res.data
})
this.formData = JSON.parse(option.formData)
if (option.mer_id) {
this.mer_id = option.mer_id
}
}
};
</script>
<style lang='scss'>
.MediumFont {}
.RegularFont {}
.content {
box-sizing: border-box;
padding: 30rpx;
background-color: #F1F1F1;
min-height: 100vh;
position: relative;
font-size: 28rpx;
}
.label-cls {
background-color: white;
padding: 8rpx 30rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
.description {
background-color: #F1F1F1;
padding: 30rpx 0rpx;
font-size: 28rpx;
color: #777777;
width: 690rpx;
}
.attr-custom {
display: flex;
align-items: center;
border: 1px solid #38BE41;
background-color: #E0EFE1;
border-radius: 36rpx 36rpx 36rpx 36rpx;
padding: 7rpx 10rpx;
color: #20B128;
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 670rpx;
}
.pop-head {
display: flex;
justify-content: space-between;
color: #20B128;
margin-bottom: 42rpx;
}
.Positioning {
display: flex;
justify-content: space-between;
}
.province {
display: flex;
position: relative;
.province-li {
color: #707070;
font-size: 32rpx;
margin: 30rpx 40rpx 30rpx 0;
}
.province-line {
position: absolute;
height: 2px;
width: 40rpx;
background-color: #20B128;
bottom: 20rpx;
left: 30rpx;
transition: 500ms;
}
}
.position-content {
height: 600rpx;
overflow-y: auto;
.position-li {
font-size: 28rpx;
color: #707070;
margin-top: 30rpx;
display: flex;
align-items: center;
}
.act {
color: #20B128;
}
}
.goods-leval {
overflow-y: auto;
display: flex;
flex-wrap: wrap;
margin-bottom: 20rpx;
.goods-leval-li {
margin-right: 20rpx;
padding: 10rpx 40rpx;
height: 60rpx;
margin-bottom: 20rpx;
border-radius: 36rpx 36rpx 36rpx 36rpx;
background-color: #F1F1F1;
}
.act {
color: #20B128;
background-color: #E8F7E9;
border: 1px solid #20B128;
}
}
/* .toast {
position: absolute;
color: white;
background-color: #20B128;
display: flex;
align-items: center;
padding: 20rpx;
} */
</style>

View File

@ -0,0 +1,392 @@
<template>
<view class="content">
<view class="">
<u-button icon="plus" text="新增规格" @click="pushFn" class="custom-style" iconColor='#38BE41'></u-button>
</view>
<view class="card" v-for="(item,index) in attrValue">
<view class="card-head card-li">
<text style="font-size: 32rpx;">规格{{index+1}}</text>
<view class="" style="width: 300rpx;">
<!-- {{formData.attr}} -->
<!-- <u--input placeholder="请输入规格名称" inputAlign='right' v-model="formData.attr[index].value"></u--input> -->
<u--input placeholder="请输入规格名称" inputAlign='right' v-model="item.sku"></u--input>
</view>
</view>
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
<view class="">
<view class="" style="display: flex;align-items: center;justify-content: space-between;">
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="item.price"
type='number'></u--input>
<view class="" style="flex: 1;text-align: center;">
/
</view>
<view class="" @click="unitIptClick(index,false)" style="width: 100rpx;flex: 2.4">
<u--input readonly style=" background-color: #F6F6F6;pointer-events: none;"
placeholder="请输入计量单位" v-model="item.unit_name"></u--input>
</view>
</view>
<view class="" v-if='isWholeSale'
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;">
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输批发价格"
v-model="item.wholesale_price" type='number'></u--input>
<view class="" style="flex: 1;text-align: center;">
/
</view>
<view class="" @click="unitIptClick(index,true)" style="width: 100rpx;flex: 2.4">
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
v-model="item.wholesale_unit_name"></u--input>
</view>
</view>
</view>
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
<view class=" card-li">
<text style="font-size: 32rpx;">商品库存</text>
<view class="" style="width: 300rpx;">
<u--input type='number' placeholder="请填写库存数量" inputAlign='right' v-model="item.stock"></u--input>
</view>
</view>
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
<view class=" card-li">
<text style="font-size: 32rpx;">条形码</text>
<view class="" style="width: 300rpx;">
<u--input placeholder="请填写商品条形码" inputAlign='right' v-model="item.bar_code"
type='number'></u--input>
</view>
</view>
<u-line direction="row" style="margin: 25rpx 0;" color="#ECECEC"></u-line>
<view class="card-li">
<view style="display: flex;color: #777777;"
@click="attrValue.splice(index,1),formData.attr.splice(index,1)">
<u-icon name="trash" style='margin-right: 8rpx;'></u-icon>
</view>
<view class="" style="display: flex;align-items: center;">
<u-switch v-model="item.is_use" type='primaryy' activeColor="#38BE41" size="19"></u-switch>
<text style="margin-left: 8rpx;color: #777777;">启用</text>
</view>
</view>
</view>
<view class="submit-btn">
<u-button type="primary" shape="circle" text="保存" @click="submit"></u-button>
</view>
<u-popup :show="showPouple" @close="showPouple=false" @open="showPouple=true" :round="10">
<view class="RegularFont" style="padding: 42rpx 40rpx">
<view class="pop-head">
<text v-if='!showCustom' @click='showPouple=false'>取消</text>
<text v-else @click='showCustom=false'>
<u-icon name="arrow-left" size="20"></u-icon>
</text>
<text style="font-size:32rpx ;color:#333333 ;">计量单位</text>
<text v-if='showCustom' @click='addAttr'>确定</text>
<text v-else></text>
</view>
<view style="height: 500rpx;">
<u-transition :show="!showCustom" mode="slide-right">
<view class="goods-leval">
<view class="goods-leval-li" v-for='(item,index) in attrList' :key='index'
@click='choseAttr(item)'>
{{item}}
</view>
<view class="goods-leval-li " style="display: flex;color:#38BE41 ;"
@click="showCustom=true">
<u-icon name="plus" color="#38BE41" style='margin-right: 8rpx;'></u-icon>
</view>
</view>
</u-transition>
<u-transition :show="showCustom" mode="slide-left">
<view class="transition">
<u--textarea v-model="selfAttr" placeholder="请输入计量单位"></u--textarea>
</view>
</u-transition>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
formatDate
} from '../../../libs/uniApi'
export default {
data() {
return {
selfAttr: "",
attrList: ['斤',
"公斤",
"吨",
"升",
"个",
"台",
"瓶",
"桶",
"箱",
"袋",
"包",
"盒",
"件",
"罐"
],
showCustom: false, //
showPouple: false,
unitIndex: 0,
mer_id: "",
isWholeSale: "",
isWhose: false,
text: "",
value: "",
formData: {},
"attrValue": [{
detail: {
' ': '',
},
"price": "",
"unit_name": "",
"wholesale_unit_name": "",
"wholesale_price": '',
"cost": "",
"stock": "",
sku: '',
"ot_price": "",
"procure_price": "",
"bar_code": "",
"weight": "",
"extension_one": "",
"extension_two": "",
uuid: "",
volume: "",
"is_use": 0,
}],
rules: {
price: '单价不能为空',
unit_name: '计量单位不能为空',
wholesale_price: '批发价格不能为空',
wholesale_unit_name: '批发单位不能为空',
stock: '库存不能为空',
}
}
},
methods: {
choseAttr(name) {
this.isWhose ?
this.attrValue[this.unitIndex].wholesale_unit_name = name :
this.attrValue[this.unitIndex].unit_name = name;
this.showPouple = false
},
addAttr() {
if (!this.selfAttr) return;
this.attrList.push(this.selfAttr)
this.isWhose ?
this.attrValue[this.unitIndex].wholesale_unit_name = this.attrList[this.attrList.length - 1] :
this.attrValue[this.unitIndex].unit_name = this.attrList[this.attrList.length - 1];
// this.attrValue[this.unitIndex].unit_name = this.attrList[this.attrList.length - 1]
// this.attrValue[this.unitIndex].wholesale_unit_name = this.attrList[this.attrList.length - 1]
this.selfAttr = ''
this.showCustom = false
this.showPouple = false
},
// hide() {
// uni.hideKeyboard()
// },
unitIptClick(index, type) {
this.isWhose = type
this.unitIndex = index
this.showPouple = true
uni.hideKeyboard()
},
pushFn() {
this.attrValue.push({
detail: {
' ': '',
},
"price": "",
"unit_name": "",
"wholesale_unit_name": "",
"wholesale_price": '',
"cost": "",
"stock": "",
sku: '',
"ot_price": "",
"procure_price": "",
"bar_code": "",
"weight": "",
"extension_one": "",
"extension_two": "",
uuid: "",
volume: "",
"is_use": true,
})
// this.formData.attr.push({
// value: '',
// detail: [],
// })
},
submit() {
//
let errList = []
if (!this.isWholeSale) {
delete this.rules.wholesale_unit_name
delete this.rules.wholesale_price
}
this.attrValue.forEach(item => {
for (let key in this.rules) {
if (!item[key]) {
errList.push(this.rules[key])
}
}
if (this.attrValue.length > 1) {
if (!item['sku']) {
errList.push('规格名称不能为空')
}
}
})
if (errList.length > 0) {
console.log(errList)
uni.$u.toast(errList[0])
return
}
console.log(this.attrValue)
//
this.formData.attr[0].detail = []
this.attrValue.forEach(item => {
typeof(item.detail) == 'object' ?
item.detail[' '] = item.sku: (item.detail = {}, item.detail[' '] = item.sku)
console.log(this.formData.attr)
this.formData.attr[0].detail.push(item.sku)
})
this.formData.attrValue = this.attrValue
this.formData.attrValue.forEach(item => {
item.is_use = item.is_use ? '0' : '1'
})
let that = this
// this.formData.attrValue.forEach((item, index) => {
// item.detail. = this.formData.attr[index].value
// item.sku = this.formData.attr[index].value
// })
this.formData.spec_type = this.formData.attrValue.length > 1 ? '1' : '0'
uni.redirectTo({
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${that.mer_id}&&formData=${JSON.stringify(that.formData) }&&showSet=${true}`
})
},
initFomrData(option) {
if (option.mer_id) {
this.mer_id = option.mer_id
}
if (option.formData) {
this.formData = JSON.parse(option.formData)
}
}
},
onLoad(option) {
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale == 2;
this.initFomrData(option)
this.attrValue = this.formData.attrValue
this.attrValue.forEach(item => {
item.is_use = !Boolean(Number(item.is_use))
})
if (this.formData.attr.length == 0) {
this.formData.attr.push({
value: '',
detail: [],
})
}
console.log(this.formData)
}
}
</script>
<style lang='scss'>
.custom-style {
color: $uni-newTheme-color;
height: 104rpx;
}
.content {
box-sizing: border-box;
padding: 30rpx;
background-color: #F1F1F1;
min-height: 100vh;
position: relative;
font-size: 28rpx;
padding-bottom: 200rpx;
.card {
margin-top: 30rpx;
padding: 30rpx 46rpx;
background-color: white;
border-radius: 16rpx 16rpx 16rpx 16rpx;
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
position: relative;
.card-li {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.card-head::after {
content: '';
position: absolute;
font-size: 32rpx;
left: 20rpx;
width: 8rpx;
height: 32rpx;
top: 50rpx;
background-color: #40AE36;
border-radius: 4rpx 4rpx 4rpx 4rpx;
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 670rpx;
}
}
.pop-head {
display: flex;
justify-content: space-between;
color: #20B128;
margin-bottom: 42rpx;
}
.goods-leval {
display: flex;
flex-wrap: wrap;
overflow-y: auto;
.goods-leval-li {
margin-right: 20rpx;
padding: 10rpx 40rpx;
height: 60rpx;
margin-bottom: 20rpx;
border-radius: 36rpx 36rpx 36rpx 36rpx;
background-color: #F1F1F1;
}
.act {
color: #20B128;
background-color: #E8F7E9;
border: 1px solid #20B128;
}
}
</style>

View File

@ -0,0 +1,154 @@
<template>
<view class="content">
<view class="" style="padding: 30rpx;">
<u-search v-model="keyword" :showAction="true" actionText="搜索" :animation="true"
@change="hdChange"></u-search>
</view>
<view class="" v-if='!keyword' style="padding-left: 44rpx;">
<view style="margin: 60rpx 0 30rpx 14rpx;">
常用分类
</view>
<view class="types">
<view class="types-li" v-for="(item,index) in typeList" @click='hdChose(item)'>
{{item.label}}
</view>
</view>
<view style="margin: 60rpx 0 30rpx 14rpx;">
热门分类
</view>
<view class="types">
<view class="types-li" v-for="(item,index) in hotList" @click='hdChose(item)'>
{{item.label}}
</view>
</view>
</view>
<view class="" v-else style="margin: 10rpx 0 0 30rpx;">
<view class="" v-if='searchList.length'>
<view class="keyword-li" v-for='item in searchList' @click='hdChose(item)'>
{{item.label}}
<u-line direction="row" color="#ECECEC"></u-line>
</view>
</view>
<view v-else style="text-align: center;margin-top: 50rpx;">
暂无搜索结果,点击 <text @click="navgo" style='color:#35BC3E;text-decoration: underline;'>手动选择</text>
</view>
</view>
</view>
</template>
<script>
import {
categorySearch,
categoryHotcate,
categorySearchHistory,
} from '@/api/product.js'
export default {
data() {
return {
formData: {},
type: 'detail',
keyword: "",
mer_id: "",
searchList: [],
hotList: [],
typeList: []
}
},
methods: {
hdChange() {
console.log(this.searchList)
categorySearch(this.mer_id, {
keyword: this.keyword
}).then(res => {
this.searchList = res.data
})
},
navgo() {
uni.redirectTo({
url: `/pages/product/addGoodDetail/goodsType?mer_id=${this.mer_id}&&type=${this.type}&&formData=${JSON.stringify(this.formData)}`
})
},
hdChose(item) {
this.formData.cate_name = item.label.includes('--') ? item.label
.split('--')[1] : item.label;
this.formData.cate_id = item.value
categorySearchHistory(this.mer_id, this.$store.state.app.userInfo.uid, {
cate_id: item.value
})
uni.redirectTo({
url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)}`
})
},
initFormData(option) {
this.mer_id = option.mer_id
if (option.type) {
this.type = 'simple'
}
this.formData = JSON.parse(option.formData)
}
},
onLoad(option) {
this.initFormData(option)
categoryHotcate(
option.mer_id,
this.$store.state.app.userInfo.uid
).then(res => {
this.hotList = res.data.hot_cate.map(item => ({
label: item.cate_name,
value: item.store_category_id
}))
this.typeList = res.data.active_cate.map(item => ({
label: item.cate_name,
value: item.store_category_id
})
)
})
}
}
</script>
<style lang='scss'>
.MediumFont {}
.RegularFont {}
.content {
box-sizing: border-box;
background-color: #FFFFFF;
min-height: 100vh;
position: relative;
font-size: 28rpx;
.types {
display: flex;
flex-wrap: wrap;
.types-li {
background-color: #F6F6F6;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 16rpx 24rpx;
margin-bottom: 46rpx;
margin-right: 20rpx;
}
}
.keyword-li {
padding-right: 30rpx;
/* background-color: #F6F6F6; */
height: 100rpx;
line-height: 100rpx;
}
.keyword-li:active {
background-color: #F6F6F6;
}
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<view class="">
<!-- <view class="" style="padding: 30rpx;font-size: 28rpx;color: #989898;font-family: PingFangRegular;">
<text>当前已选</text>
<text style="margin-left: 48rpx;color: #20B128;">生鲜--水果阿萨</text>
</view> -->
<view class="content">
<view class="lines" :style="{top:(actIndex*40)+16+'px'}" />
<view class="left">
<view class="left-li" v-for="(item,index) in leftList" :class="actIndex==index?'act-li':''"
@click="hdClick(index)">
{{item.label}}
</view>
</view>
<view class="">
<u-line direction="col" color="#ECECEC"></u-line>
</view>
<view class="right">
<u-search :showAction="true" v-model="keyword" actionText="搜索" :animation="true" @search='hdSearch'
@custom='hdSearch'> </u-search>
<view style="margin: 30rpx 0;font-size: 28rpx; color: #989898;">
可能在找
</view>
<view class="right-content">
<view class="right-content-li" v-for="(item,index) in rightList" @click="choseType(item)">
{{item.label}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
formatDate
} from '../../../libs/uniApi';
import {
categoryList,
categorySearch
} from '@/api/product.js'
export default {
data() {
return {
type: 'detail',
mer_id: "",
keyword: "",
actIndex: 0,
leftList: [],
rightList: [],
formData: {}
};
},
methods: {
hdClick(index) {
this.actIndex = index
this.rightList = this.leftList[index].children
},
choseType(item) {
this.formData.cate_name = item.label.includes('--') ? item.label
.split('--')[1] : item.label;
this.formData.cate_id = item.value
if (this.type == 'detail') {
uni.redirectTo({
url: `/pages/product/addGoodDetail/addGoodDetail?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)} `
})
} else {
uni.redirectTo({
url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}&&formData=${JSON.stringify(this.formData)}`
})
}
},
hdSearch() {
categorySearch(this.mer_id, {
keyword: this.keyword
}).then(res => {
this.rightList = res.data
})
},
initFormData(option) {
this.mer_id = option.mer_id
if (option.type) {
this.type = 'simple'
}
this.formData = JSON.parse(option.formData)
}
},
onLoad(option) {
this.initFormData(option)
categoryList(option.mer_id).then((res) => {
this.leftList = res.data
this.rightList = res.data[0].children
}).catch(e => {
console.log(e);
})
}
};
</script>
<style lang='scss'>
.content {
display: flex;
box-sizing: border-box;
padding: 15px;
background-color: white;
min-height: 100vh;
position: relative;
.lines {
height: 16px;
border-radius: 5px;
width: 3px;
background-color: #40AE36;
position: absolute;
left: 20rpx;
transition: 200ms;
top: 33rpx;
}
.left {
margin-right: 30rpx;
width: 140rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
.left-li {
text-align: center;
font-size: 32rpx;
color: #444444;
height: 40px;
/* border-top: 1px solid red; */
}
.act-li {
color: $uni-newTheme-color;
}
}
.right {
padding: 0 20rpx;
position: fixed;
width: 530rpx;
left: 220rpx;
min-height: 100vh;
overflow-y: auto;
.right-content {
display: flex;
/* justify-content: space-around; */
flex-wrap: wrap;
.right-content-li {
margin-right: 20rpx;
color: #444444;
font-size: 28rpx;
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #989898;
padding: 16rpx 24rpx;
margin-bottom: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,33 @@
<template>
<view class="">
<u-overlay :show="showOverly||(where.type==2&&flag)||(where.type==3&&flag1)">
<view class="warp">
<view class="" style='font-size: 32rpx;'>
温馨提示
</view>
<view class="">
当前商品待审核删除后将移至回收站
</view>
<view class="warp-foot">
<view class="warp-foot-li">
<u-button text="返回" @click="showOverly = false"></u-button>
</view>
<view class="warp-foot-li">
<u-button type='primary' text="删除" @tap="handleRecycle(xjItem,where.type)"></u-button>
<u-button type='primary' text="我知道了" @tap="Iknow"></u-button>
<u-button type='primary' v-else text="继续下架" @tap="handleShelves(xjItem,0)"></u-button>
</view>
</view>
</view>
</u-overlay>
</view>
</template>
<script>
export default {
}
</script>
<style>
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,173 @@
<template>
<view class="" style="width: 750rpx;height: 100%;">
<view class="jump" @click="next">
<text class="font">跳过 </text>
</view>
<view class="target" :style="{left:left+'px',top:top+'px'}" v-if="top">
<text style="color:white;text-align: center;font-size: 32rpx;line-height: 32px;">发布商品</text>
</view>
<view class="next-btn" :style="{top:(bottomBtn-100) +'px'}">
<text class="next-btn-text font" @click="next">我知道了</text>
</view>
<view class="" :style="{left:(left+10)+'px',top:bottomBtn+50+'px'}">
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;" mode=""></image>
</view>
<view class="tips" :style="{ left:(left-100)+'px',top:(top-260)+'px'}">
<view class="tras" :class="{act:isActive}">
<text class="font" style="line-height: 106rpx;">点击发布商品,开启赚钱之旅</text>
</view>
</view>
<view style="position: absolute;" :style="{left:left+50+'px',top:(top-50)+'px'}">
<image src="/static/images/greenLine.png" style="width:35px;height: 60px;" mode=""></image>
</view>
</view>
</template>
<script>
import {
isNewMer
} from '@/api/user.js';
export default {
data() {
return {
isActive: false,
left: -100,
top: 0,
subNVue: null,
bottomBtn: -100,
screenHeight: 672,
}
},
methods: {
jump() {
this.subNVue.hide('zoom-in', 300, )
},
test() {
this.subNVue.hide()
},
next() {
this.subNVue.hide('zoom-in', 300, )
isNewMer(this.$store.state.app.userInfo.uid, this.$store.state.app.userInfo.service?.mer_id, {
done: 1
}).then(res => {
console.log('res', res)
})
}
},
onLoad() {
let that = this
this.subNVue = uni.getSubNVueById('concatpro')
uni.$on('diverProductEmit', (data) => {
that.left = data.left
const res = uni.getSystemInfo({
success: (res => {
that.bottomBtn = res.screenHeight - 150
this.screenHeight = res.screenHeight
that.top = res.screenHeight - 55
// console.log('screenheight', this.screenHeight)
})
});
}),
setTimeout(() => {
that.isActive = true
}, 1000)
}
}
</script>
<style>
/* 定义动画效果 */
.target {
position: relative;
font-size: 32rpx;
border-radius: 40rpx;
height: 72rpx;
background-color: #32BB3B;
width: 302rpx;
}
.tips {
width: 462rpx;
height: 106rpx;
background-color: #5BE157;
border-radius: 20rpx;
padding-left: 20rpx;
}
.imgs {
width: 62px;
height: 62px;
position: absolute;
left: 40px;
top: 40px;
transform: translate(-50%, -50%);
}
.tras {
width: 0;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 500rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
}
.bgimg {
width: 200rpx;
position: absolute;
z-index: 1;
}
.img {
opacity: 0;
width: 50rpx;
height: 50rpx;
transition-property: opacity;
transition-duration: 1s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.next-btn {
position: absolute;
left: 375rpx;
transform: translateX(-50%);
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
background: rgba(255, 255, 255, 0.4);
}
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
.jump {
position: absolute;
right: 30rpx;
top: 80rpx;
border: 1px solid white;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
</style>

View File

@ -1,189 +1,344 @@
<template>
<view class="">
<view class="table">
<u-sticky custom-nav-height="0" bgColor="#fff">
<view class="line th">
<view class="td img">图片</view>
<view class="td sku">规格</view>
<view class="td stock">库存</view>
</view>
</u-sticky>
<view class="line tr" v-for="(item,index) in short.attrValue" :key="index">
<view class="td img">
<image :src="item.image||short.image||defualtImg"></image>
</view>
<view class="td sku">
<block v-if="item.sku">
<view v-for="name in item.sku.split(',')">{{name}}</view>
</block>
<view v-else>{{short.store_name}}</view>
</view>
<view class="td stock">
<input type="number" v-model="item.stock" />
</view>
</view>
</view>
<view style="height: 150rpx;"></view>
<view class="btn-view">
<button class="btn" @click="show=true">确认修改</button>
</view>
<u-modal :show="show" :closeOnClickOverlay="true" title="提示" content="确定更新库存吗" showCancelButton @confirm="onUpdate" @cancel="show=false"></u-modal>
</view>
<view class="content">
<view class="head">
<view class="" style="width: 210rpx;height: 210rpx;position: relative;">
<!-- <u--image :src="short.image" width='210rpx' height='210rpx' duration="450"></u--image> -->
<image :src="short.image" style="width: 210rpx;height: 210rpx;" mode=""></image>
<view class="preview" @click="preViewImg(short.image)">
点击预览
</view>
</view>
<view class="right">
<view class="">
<view class="" style="font-size: 32rpx;color: #444444;">
{{short.store_name}}
</view>
<view class="" style="font-size: 24rpx;color: #989898;margin-top: 10rpx;">
<!-- 库存 {{short.attrValue[0].stock}} -->
库存 {{attrvalueStock}}
</view>
</view>
<view class="" style="color: #FC452F;font-size: 24rpx;">
<text style="font-size: 22rpx;"></text><text>10.00</text><text style="color: #828282;">/</text>
</view>
</view>
</view>
<view class="attr" v-for="(item,index) in short.attrValue" :key="index">
<view class="attr-tit">
{{item.sku||'单规格'}}
</view>
<u-line color="#CECECE" style="margin: 30rpx 0 28rpx 0"></u-line>
<view class="" style="display: flex;justify-content: space-between;font-size: 32rpx;">
<view class="">
商品库存
</view>
<view class="" style="display: flex;align-items: center;color: #FC452F;">
<u--input border="surround" color='#FC452F' inputAlign='right' style='padding: 0;'
v-model="item.stock"></u--input>
</view>
</view>
</view>
<!-- <view class="table">
<u-sticky custom-nav-height="0" bgColor="#fff">
<view class="line th">
<view class="td img">图片</view>
<view class="td sku">规格</view>
<view class="td stock">库存</view>
</view>
</u-sticky>
<view class="line tr" v-for="(item,index) in short.attrValue" :key="index">
<view class="td img">
<image :src="item.image||short.image||defualtImg"></image>
</view>
<view class="td sku">
<block v-if="item.sku">
<view v-for="name in item.sku.split(',')">{{name}}</view>
</block>
<view v-else>{{short.store_name}}</view>
</view>
<view class="td stock">
<input type="number" v-model="item.stock" />
</view>
</view>
</view> -->
<view style="height: 150rpx;"></view>
<!-- <view class="btn-view">f
<button class="btn" @click="show=true">确认修改</button>
</view> -->
<view class="submit-btn">
<u-button type="primary" shape="circle" text="确认修改" @click="show=true"></u-button>
</view>
<u-modal :show="show" :closeOnClickOverlay="true" title="提示" content="确定更新库存吗" showCancelButton
@confirm="onUpdate" @cancel="show=false"></u-modal>
</view>
</template>
<script>
import {
getProductDetail,
} from '@/api/store.js';
import {
productDetail,
productUpdateFree
} from "@/api/product.js"
import { Toast } from '../../../libs/uniApi';
export default {
data() {
return {
show: false,
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
mer_id: '',
short: {
product_id: ''
}
}
},
onLoad(options) {
this.short.product_id = options.product_id;
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string')userInfo = JSON.parse(userInfo);
this.mer_id = userInfo.service.mer_id;
this.initInfo();
},
onShow() {},
methods: {
initInfo() {
productDetail(this.mer_id, this.short.product_id).then((res) => {
this.short = res.data;
console.log({...res.data});
})
},
onUpdate(){
let obj = {
"attr": this.short.attr,
"attrValue": this.short.attrValue,
"mer_cate_id": this.short.merCateId||[],
"spec_type": this.short.spec_type,
"is_stock": 1
};
// return console.log({...obj},this.short.product_id);
productUpdateFree(this.short.product_id, obj).then(res => {
this.show = false;
this.$nextTick(()=>{
Toast('更新成功');
})
uni.navigateBack({
success:()=> {
let stock = 0;
this.short.attrValue.forEach(item=>{
stock = stock + parseInt(item.stock);
})
uni.$emit('updateStock', {
product_id: this.short.product_id,
stock: stock
})
}
})
}).catch(err => {
this.show = false;
this.$util.Tips({
title: err
})
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
import {
getProductDetail,
} from '@/api/store.js';
import {
productDetail,
productUpdateFree
} from "@/api/product.js"
import {
Toast
} from '../../../libs/uniApi';
export default {
data() {
return {
test: '20',
show: false,
defualtImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/00ebcfdf75684f5494c0193075055d1.png',
mer_id: '',
type: "",
short: {
product_id: ''
},
attrvalueStock: 0,
}
},
onLoad(options) {
this.short.product_id = options.product_id;
let userInfo = this.$store.state.app.userInfo;
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
this.mer_id = userInfo.service.mer_id;
this.initInfo();
},
onShow() {},
methods: {
preViewImg(url) {
let that = this
uni.previewImage({
urls: [url],
// longPressActions: {
// itemList: ['', '', ''],
// success: function(data) {
// console.log('' + (data.tapIndex + 1) + ',' + (data.index + 1) + '');
// },
// fail: function(err) {
// console.log(err.errMsg);
// }
// }
});
},
initInfo() {
productDetail(this.mer_id, this.short.product_id).then((res) => {
this.short = res.data;
this.attrvalueStock = res.data.attrValue[0].stock
console.log({
...res.data
});
})
},
onUpdate() {
let obj = {
"attr": this.short.attr,
"attrValue": this.short.attrValue,
"mer_cate_id": this.short.merCateId || [],
"spec_type": this.short.spec_type,
"is_stock": 1
};
// return console.log({...obj},this.short.product_id);
productUpdateFree(this.short.product_id, obj).then(res => {
this.show = false;
this.$nextTick(() => {
Toast('更新成功');
setTimeout(() => {
uni.navigateBack()
}, 2000)
})
// uni.redirectTo({
// url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
// })
// uni.navigateBack({
// success: () => {
// let stock = 0;
// this.short.attrValue.forEach(item => {
// stock = stock + parseInt(item.stock);
// })
// uni.$emit('updateStock', {
// product_id: this.short.product_id,
// stock: stock
// })
// }
// })
}).catch(err => {
this.show = false;
this.$util.Tips({
title: err
})
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.table{
background-color: #fff;
border-top: 1rpx solid rgba(0,0,0,0.1);
border-left: 1rpx solid rgba(0,0,0,0.1);
border-right: 1rpx solid rgba(0,0,0,0.1);
font-size: 28rpx;
.line{
display: flex;
border-bottom: 1rpx solid rgba(0,0,0,0.1);
.img{
// width:140rpx;
width: 200rpx;
}
.sku{
flex: 1;
border-left: 1rpx solid rgba(0,0,0,0.1);
border-right: 1rpx solid rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
align-items: center;
}
.stock{
width: 200rpx;
input{
width: 100%;
height: 100%;
text-align: center;
color: #F84221;
}
}
}
.th{
height: 70rpx;
line-height: 70rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
}
.tr{
min-height: 140rpx;
.td{
display: flex;
justify-content: center;
align-items: center;
}
.img{
image{
width: 120rpx;
height: 120rpx;
}
}
.sku{
padding: 16rpx 16rpx;
}
}
}
.btn-view{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 130rpx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-top: 1rpx solid rgba(0,0,0,0.1);
.btn{
background: linear-gradient(180deg, #FF6D20 0%, #F84221 100%);
// background-color: #FF6D20;
height: 100rpx;
line-height: 100rpx;
width: 694rpx;
text-align: center;
border-radius: 100rpx;
color: #fff;
}
}
.content {
padding: 20rpx 16rpx;
background-color: #F1F1F1;
min-height: 100vh;
.head {
background-color: #fff;
display: flex;
padding: 20rpx;
border-radius: 16rpx;
.right {
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
.attr {
width: 690rpx;
margin: 22rpx auto;
box-sizing: border-box;
background-color: white;
padding: 30rpx;
border-radius: 16rpx;
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
.attr-tit {
margin-left: 16rpx;
font-size: 32rpx;
position: relative;
}
.attr-tit::after {
content: '';
position: absolute;
width: 8rpx;
height: 32rpx;
background-color: #40AE36;
border-radius: 4rpx;
left: -16rpx;
top: 10rpx;
}
}
}
.preview {
width: 210rpx;
height: 50rpx;
position: absolute;
bottom: 0;
background: rgba(0, 0, 0, 0.2);
color: white;
text-align: center;
font-size: 24rpx;
line-height: 50rpx;
}
.submit-btn {
position: fixed;
bottom: 50rpx;
width: 670rpx;
}
// old
.table {
background-color: #fff;
border-top: 1rpx solid rgba(0, 0, 0, 0.1);
border-left: 1rpx solid rgba(0, 0, 0, 0.1);
border-right: 1rpx solid rgba(0, 0, 0, 0.1);
font-size: 28rpx;
.line {
display: flex;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.img {
// width:140rpx;
width: 200rpx;
}
.sku {
flex: 1;
border-left: 1rpx solid rgba(0, 0, 0, 0.1);
border-right: 1rpx solid rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
align-items: center;
}
.stock {
width: 200rpx;
input {
width: 100%;
height: 100%;
text-align: center;
color: #F84221;
}
}
}
.th {
height: 70rpx;
line-height: 70rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
}
.tr {
min-height: 140rpx;
.td {
display: flex;
justify-content: center;
align-items: center;
}
.img {
image {
width: 120rpx;
height: 120rpx;
}
}
.sku {
padding: 16rpx 16rpx;
}
}
}
.btn-view {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 130rpx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-top: 1rpx solid rgba(0, 0, 0, 0.1);
.btn {
background: linear-gradient(180deg, #FF6D20 0%, #F84221 100%);
// background-color: #FF6D20;
height: 100rpx;
line-height: 100rpx;
width: 694rpx;
text-align: center;
border-radius: 100rpx;
color: #fff;
}
}
</style>

27
pages/test/index.vue Normal file
View File

@ -0,0 +1,27 @@
<template>
<view class="" style="width: 750rpx;height: 100vh;background-color: pink;">
我已经吐了傻逼是的
<button @click="tests">anniu1</button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
tests() {
const subNVue = uni.getSubNVueById('concat')
subNVue.show('slide-in-left', 200, () => {
console.log('subNVue 原生子窗体显示成功');
})
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,15 @@
<template>
<view class="" style="padding: 200rpx;background-color: red; width: 500rpx;height: 500rpx;">
<image src="/static/images/f.png" alt="" />
</view>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -1,211 +1,415 @@
@charset "UTF-8";
* {scrollbar-color: #e5e5e5 #f7f7f9;scrollbar-width: thin;}
html {margin: 0 auto;max-width: 1200px;}
body {overflow-x: hidden;}
.font-color,.font-color-red {color:#fc4141!important}
.bg-color{background-color:#e93323!important}
.icon-color{color: #ff3c2b}
.cart-color {color: #ff3700 !important;border:1px solid #ff3700 !important}
.padding20{padding: 20rpx}
.pad20 {padding: 0 20rpx}
.padding30{padding: 30rpx}
.pad30{padding: 0 30rpx}
.pull-left{float: left;}
.pull-right{float: right;}
.clearfix:after{content:'';display:block;height:0;clear:both}
.clearfix{zoom:1}
.acea-row {display:-webkit-box;display:-moz-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-lines: multiple;
-moz-box-lines:multiple;-o-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}
* {
scrollbar-color: #e5e5e5 #f7f7f9;
scrollbar-width: thin;
}
html {
margin: 0 auto;
max-width: 1200px;
}
body {
overflow-x: hidden;
}
.font-color,
.font-color-red {
color: #fc4141 !important
}
.bg-color {
background-color: #e93323 !important
}
.icon-color {
color: #ff3c2b
}
.cart-color {
color: #ff3700 !important;
border: 1px solid #ff3700 !important
}
.padding20 {
padding: 20rpx
}
.pad20 {
padding: 0 20rpx
}
.padding30 {
padding: 30rpx
}
.pad30 {
padding: 0 30rpx
}
.pull-left {
float: left;
}
.pull-right {
float: right;
}
.clearfix:after {
content: '';
display: block;
height: 0;
clear: both
}
.clearfix {
zoom: 1
}
.acea-row {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-lines: multiple;
-moz-box-lines: multiple;
-o-box-lines: multiple;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap
}
.acea-row.row-middle {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center
}
.acea-row.row-top {
-webkit-box-align: start;
-moz-box-align: start;
-o-box-align: start;
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start
-webkit-box-align: start;
-moz-box-align: start;
-o-box-align: start;
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start
}
.acea-row.row-bottom {
-webkit-box-align: end;
-moz-box-align: end;
-o-box-align: end;
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end
-webkit-box-align: end;
-moz-box-align: end;
-o-box-align: end;
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end
}
.acea-row.row-center {
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-right {
-webkit-box-pack: end;
-moz-box-pack: end;
-o-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
-webkit-box-pack: end;
-moz-box-pack: end;
-o-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.acea-row.row-left {
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start
}
.acea-row.row-between {
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-around {
justify-content: space-around;
-webkit-justify-content: space-around
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column-around {
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
justify-content: space-around;
-webkit-justify-content: space-around
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column
}
.acea-row.row-column-between {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-center-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-between-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.start {
width: 122rpx;
height: 30rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDMDg0NEE2QTVFNUQxMUU4QUI3RkNGOTgwNDYyRUZDOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODU5QzVENDMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODU5QzVEMzMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkN2ZhZTM5NC0wNmE4LTkzNGYtODA0OS0zNjBjNTcxOTU2YjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpmYWI1M2NhMC04MWE1LTE5NGItYmJlYi1jMzI2MjIwNmNhOTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4ctYL1AAAHsElEQVR42uycS4gcVRiFq5Mm4yuKihoVlKg7IVlkI4oGFV9R4wPSJChBMW5ECYooKuIbEReCBBGJEDS+BkVJYEIMJgvJIossFATxCW58boRJEDEZz83cDk3TXc/7T9Xt+g783O7p6tP/9Km6dbvp+jpzc3MJmnwt4i0gaETQiKBRM+UWY8OVpt9XXXySakcZ34Xwp/fR3mWO6LWqW/Wilxnte5b+re29TNB3+fEeozfL0r+1vXdGTRmdTmfc9HGGG1Rd1d+qZecc/PGfcVPI2Bc19Kf3uSBHdM+/mNNpqtsD77WW/q3uvTtmDzpPw9kDxm5XW6q6b2jTB7XtrEZXc35vc/rNV7LQ/vQ+2rs75v/Zproux45yhWrniL/vUq1JeZ6lP70XmLpvVr1SYoo5qnrBrQ4ztrP0p/eiizFND9dreHdgOknTr25lqEXCvrwLGgt/ei+xGNOTP9ewUrUn48XclLGi/2J5ZelP7wVX3TJxJ/f3Mjbbpu3+KrOctPSn9+Ifr9ZWfLxOf3rPE7TOF1Mabhg68e/yy/q+1mi7bpn/xNKf3osd0deqTva3f1ZdpenCLeFXq37wfz9ddWXJvdbSn94LBH2bH9/2J/79/hzypV8wvD60XVFZ+tN7xhcmgzrRnQv0AjtHLBgOa9is6eOzCm+WpT+9p32ORpMnfmFC0IigEUEjgkYEjQgaETQiaETQBI0IGhE0ImhE0IigEUGj8oIaEEfvTtPT0ytVF5bxh3gQl/9TqkcWauqGeFCDv47kM5P5y2PP1+0lpkH7K+9v9HfX6/4JIf8ZS/+Ye/dap/pI5U4Nt1gf0RAP6vO/WrVX9YnqjqJPhnjQoN5Tpu0LNPzS6/XcZTmHdH9WdZbu/1kp6ARqQC29Kzw39d+rOqL6V7XY33Y/5n9pYNOtqpdd4BqX+G3dNqck81dgzuQN2l15766gf7zgDHHUN/RcxnaW/jH3fkC1QbVbR+v7Y88Rvd5BDZsGdhA3qzykWqXaP+o5EA8a2LuCe0DDparHFOqhHKvxLaovtO3Wcf4QDxrYuwJ7Q8Nbqu0KckVKyO5Kyu2qF/shl151Qw2ox1/BfaXhbtVrKZs9r7pT234T6uMV1IB6/N3F8N+mPP6dX7BV/xwNNaA+f786n+kvuFT3qzYMPL5n4Euaykc01ID6/N3HuL0K91yNH/odaKnuu3P3Mt1264SbQgUNNaAGfwU55fNxX3e+qXrCLbhUbpH2tF9pO4Dcqdp2cYig+1feb1LNDi1GDqs26+Y1Fc5Dlv4x977azwSX+AXXTwMLNTd7rPOzhfti5vIsM4gHDdIgxllH6XJ3tPrVd9qRf5GGWW33R/9vI78bIeh2iJ8SETQiaETQiKARQSOCRgSNCBoRNEEjgkYEjQgaETQiaETQiKARQSMnYDXheneqApSx9AZWE16lgTKW3sBqAqoqUMbSG1hNWFUCylh6A6sJq0pAGUtvYDUBYDJ+aq0MlLH0BlZTsHdLoAywmmL+1r2bAWUSYDX5/ReqdwugjKl32gv6N8xdcP1OxnTopruNg6yOPG+Whf9C9u6+wNDwrOoZvclfjwnCXfr6pOrRQdZI1vse2htYTYXeQwNlLL2B1VTvPRhQxtIbWE01mEySBATKWHoDq6nWe5IEBMpYegOrqdB7aKCMpTewmmq9BwXKWHrDMCkoU6AMsBpUVfyUiKARQSOCRgSNCBoRNCJoRNCIoAkaETQiaETQiKARQSOCRgSNMtQmholTFQ4IDJOwsva3ZIxY+8MwySNLxoi1PwyTYrJkjFj7wzApIEvGiLU/DJOcU58ZY8TaH4bJ6DfFjANi7Q/DpJi/JWPE2h+GSVKQYWLBAbH2h2FSkmESmgNi7Q/DpKS/JWPE2h+GSXFZMkas/YN5Z7I7xnBAdvsvNvpzzTEOiI66/0p8SWLqnwxxQPwixl1P/IF/vM8B+bhkGJb+wbwnnWGSJLaMEWt/GCY5v2gwY4xY+8MwKSZLxoi1PwyT1H/IkANi7Q/DBFUWPyUiaETQiKARQSOCRgSNCBoRNCJogkYEjQgaETQiaETQiKARQaMMNY1h4tRUDggMk/BqJAck5t4bxzBpMgck5t4bxTDxaiwHJObem8YwcWosByTm3mthmKRMT43mgMTcey0Mk1g5IDH3XhfDJEoOSMy918owiY0DEnPvtTNMYuKAxNx77QyTmDggMffeFIZJFByQmHuvnWHSf34SAQck5t6bwDBJkkg4IDH3XjvDJCYOSMy9N4FhEg0HJObeR56jh5bnGxM/Z6TIfXbeVxKS8b2bDcaxOvR3Z7tFe+2M/6q1Kd5R9Q7DpCXip0QEjQgaETQiaETQiKARQSOCRgRN0IigEUEjgkYEjQgamQhqQDt6L3tEt5IaEHPvhYNuMzUg5t7LHNGtpQbE3HuZoFtLDYi590UFp4/jV977yzmPXXkfcHoy8297790xxlADWkI8gBowYb13oAZAPDj+IT2BGhB975mLMagBk9F73lU31IDIe+/mfEGoAZH3nveIhhoQee95FmNT/nPbDn/OeLh/UbYeW67hVdWnyTwXdL0eO1JwQRPUn95LLsYSqAET0XueczTUgAnoHeJBS8RPiQgaETQiaNRM/S/AAOykxVBJG5QXAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 122rpx auto;
width: 122rpx;
height: 30rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDMDg0NEE2QTVFNUQxMUU4QUI3RkNGOTgwNDYyRUZDOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODU5QzVENDMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODU5QzVEMzMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkN2ZhZTM5NC0wNmE4LTkzNGYtODA0OS0zNjBjNTcxOTU2YjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpmYWI1M2NhMC04MWE1LTE5NGItYmJlYi1jMzI2MjIwNmNhOTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4ctYL1AAAHsElEQVR42uycS4gcVRiFq5Mm4yuKihoVlKg7IVlkI4oGFV9R4wPSJChBMW5ECYooKuIbEReCBBGJEDS+BkVJYEIMJgvJIossFATxCW58boRJEDEZz83cDk3TXc/7T9Xt+g783O7p6tP/9Km6dbvp+jpzc3MJmnwt4i0gaETQiKBRM+UWY8OVpt9XXXySakcZ34Xwp/fR3mWO6LWqW/Wilxnte5b+re29TNB3+fEeozfL0r+1vXdGTRmdTmfc9HGGG1Rd1d+qZecc/PGfcVPI2Bc19Kf3uSBHdM+/mNNpqtsD77WW/q3uvTtmDzpPw9kDxm5XW6q6b2jTB7XtrEZXc35vc/rNV7LQ/vQ+2rs75v/Zproux45yhWrniL/vUq1JeZ6lP70XmLpvVr1SYoo5qnrBrQ4ztrP0p/eiizFND9dreHdgOknTr25lqEXCvrwLGgt/ei+xGNOTP9ewUrUn48XclLGi/2J5ZelP7wVX3TJxJ/f3Mjbbpu3+KrOctPSn9+Ifr9ZWfLxOf3rPE7TOF1Mabhg68e/yy/q+1mi7bpn/xNKf3osd0deqTva3f1ZdpenCLeFXq37wfz9ddWXJvdbSn94LBH2bH9/2J/79/hzypV8wvD60XVFZ+tN7xhcmgzrRnQv0AjtHLBgOa9is6eOzCm+WpT+9p32ORpMnfmFC0IigEUEjgkYEjQgaETQiaETQBI0IGhE0ImhE0IigEUGj8oIaEEfvTtPT0ytVF5bxh3gQl/9TqkcWauqGeFCDv47kM5P5y2PP1+0lpkH7K+9v9HfX6/4JIf8ZS/+Ye/dap/pI5U4Nt1gf0RAP6vO/WrVX9YnqjqJPhnjQoN5Tpu0LNPzS6/XcZTmHdH9WdZbu/1kp6ARqQC29Kzw39d+rOqL6V7XY33Y/5n9pYNOtqpdd4BqX+G3dNqck81dgzuQN2l15766gf7zgDHHUN/RcxnaW/jH3fkC1QbVbR+v7Y88Rvd5BDZsGdhA3qzykWqXaP+o5EA8a2LuCe0DDparHFOqhHKvxLaovtO3Wcf4QDxrYuwJ7Q8Nbqu0KckVKyO5Kyu2qF/shl151Qw2ox1/BfaXhbtVrKZs9r7pT234T6uMV1IB6/N3F8N+mPP6dX7BV/xwNNaA+f786n+kvuFT3qzYMPL5n4Euaykc01ID6/N3HuL0K91yNH/odaKnuu3P3Mt1264SbQgUNNaAGfwU55fNxX3e+qXrCLbhUbpH2tF9pO4Dcqdp2cYig+1feb1LNDi1GDqs26+Y1Fc5Dlv4x977azwSX+AXXTwMLNTd7rPOzhfti5vIsM4gHDdIgxllH6XJ3tPrVd9qRf5GGWW33R/9vI78bIeh2iJ8SETQiaETQiKARQSOCRgSNCBoRNEEjgkYEjQgaETQiaETQiKARQSMnYDXheneqApSx9AZWE16lgTKW3sBqAqoqUMbSG1hNWFUCylh6A6sJq0pAGUtvYDUBYDJ+aq0MlLH0BlZTsHdLoAywmmL+1r2bAWUSYDX5/ReqdwugjKl32gv6N8xdcP1OxnTopruNg6yOPG+Whf9C9u6+wNDwrOoZvclfjwnCXfr6pOrRQdZI1vse2htYTYXeQwNlLL2B1VTvPRhQxtIbWE01mEySBATKWHoDq6nWe5IEBMpYegOrqdB7aKCMpTewmmq9BwXKWHrDMCkoU6AMsBpUVfyUiKARQSOCRgSNCBoRNCJoRNCIoAkaETQiaETQiKARQSOCRgSNMtQmholTFQ4IDJOwsva3ZIxY+8MwySNLxoi1PwyTYrJkjFj7wzApIEvGiLU/DJOcU58ZY8TaH4bJ6DfFjANi7Q/DpJi/JWPE2h+GSVKQYWLBAbH2h2FSkmESmgNi7Q/DpKS/JWPE2h+GSXFZMkas/YN5Z7I7xnBAdvsvNvpzzTEOiI66/0p8SWLqnwxxQPwixl1P/IF/vM8B+bhkGJb+wbwnnWGSJLaMEWt/GCY5v2gwY4xY+8MwKSZLxoi1PwyT1H/IkANi7Q/DBFUWPyUiaETQiKARQSOCRgSNCBoRNCJogkYEjQgaETQiaETQiKARQaMMNY1h4tRUDggMk/BqJAck5t4bxzBpMgck5t4bxTDxaiwHJObem8YwcWosByTm3mthmKRMT43mgMTcey0Mk1g5IDH3XhfDJEoOSMy918owiY0DEnPvtTNMYuKAxNx77QyTmDggMffeFIZJFByQmHuvnWHSf34SAQck5t6bwDBJkkg4IDH3XjvDJCYOSMy9N4FhEg0HJObeR56jh5bnGxM/Z6TIfXbeVxKS8b2bDcaxOvR3Z7tFe+2M/6q1Kd5R9Q7DpCXip0QEjQgaETQiaETQiKARQSOCRgRN0IigEUEjgkYEjQgamQhqQDt6L3tEt5IaEHPvhYNuMzUg5t7LHNGtpQbE3HuZoFtLDYi590UFp4/jV977yzmPXXkfcHoy8297790xxlADWkI8gBowYb13oAZAPDj+IT2BGhB975mLMagBk9F73lU31IDIe+/mfEGoAZH3nveIhhoQee95FmNT/nPbDn/OeLh/UbYeW67hVdWnyTwXdL0eO1JwQRPUn95LLsYSqAET0XueczTUgAnoHeJBS8RPiQgaETQiaNRM/S/AAOykxVBJG5QXAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 122rpx auto;
}
.start.star5{background-position:0 3rpx;}
.start.star4{background-position:0 -30rpx;}
.start.star3{background-position:0 -70rpx;}
.start.star2{background-position:0 -105rpx;}
.start.star1{background-position:0 -140rpx;}
.start.star0{background-position:0 -175rpx;}
*{box-sizing:border-box}
page{font-size: 28rpx;background-color:#f5f5f5;color: #333}
body,html{height:unset}
button{padding:0;margin:0;line-height:normal;background-color:#fff}
button::after {border:0}
radio .wx-radio-input {border-radius:50%;width:38rpx;height:38rpx}
radio .wx-radio-input.wx-radio-input-checked{border:1px solid #e93323;background-color:#e93323;}
radio .uni-radio-input{border-radius:50%;width:38rpx;height:38rpx}
radio .uni-radio-input.uni-radio-input-checked{border: 1px solid #e93323;background-color: #e93323;}
checkbox .wx-checkbox-input{width:38rpx;height:38rpx}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{color: #fff!important;}
checkbox .uni-checkbox-input{width: 38rpx;height: 38rpx}
.start.star5 {
background-position: 0 3rpx;
}
.start.star4 {
background-position: 0 -30rpx;
}
.start.star3 {
background-position: 0 -70rpx;
}
.start.star2 {
background-position: 0 -105rpx;
}
.start.star1 {
background-position: 0 -140rpx;
}
.start.star0 {
background-position: 0 -175rpx;
}
* {
box-sizing: border-box
}
page {
font-size: 28rpx;
background-color: #f5f5f5;
color: #333
}
body,
html {
height: unset
}
button {
padding: 0;
margin: 0;
line-height: normal;
background-color: #fff
}
button::after {
border: 0
}
radio .wx-radio-input {
border-radius: 50%;
width: 38rpx;
height: 38rpx
}
radio .wx-radio-input.wx-radio-input-checked {
border: 1px solid #e93323;
background-color: #e93323;
}
radio .uni-radio-input {
border-radius: 50%;
width: 38rpx;
height: 38rpx
}
radio .uni-radio-input.uni-radio-input-checked {
border: 1px solid #e93323;
background-color: #e93323;
}
checkbox .wx-checkbox-input {
width: 38rpx;
height: 38rpx
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
color: #fff !important;
}
checkbox .uni-checkbox-input {
width: 38rpx;
height: 38rpx
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked,
checkbox .wx-checkbox-input.wx-checkbox-input-checked{border:1px solid #e93323!important;background-color:#e93323!important;color:#fff!important;}
checkbox .uni-checkbox-input.uni-checkbox-input-checked::before{font-size: 35rpx}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;}
.mask{position:fixed;top: 0;left:0;right:0;bottom:0;background-color:#000;opacity:.5;z-index:30}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid #e93323 !important;
background-color: #e93323 !important;
color: #fff !important;
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
font-size: 35rpx
}
.line1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
.line2 {
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: pre-wrap;
}
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #000;
opacity: .5;
z-index: 30
}
@keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
@-webkit-keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
.loadingpic{animation:load 3s linear 1s infinite;--webkit-animation:load 3s linear 1s infinite}
.loading-list{animation:load linear 1s infinite;-webkit-animation:load linear 1s infinite;font-size:40rpx;margin-right:22rpx}
.loading{width:100%;height:100rpx;line-height:100rpx;align-items:center;justify-content:center;position:relative;text-align:center}
.loadingpic {
animation: load 3s linear 1s infinite;
--webkit-animation: load 3s linear 1s infinite
}
.loading-list {
animation: load linear 1s infinite;
-webkit-animation: load linear 1s infinite;
font-size: 40rpx;
margin-right: 22rpx
}
.loading {
width: 100%;
height: 100rpx;
line-height: 100rpx;
align-items: center;
justify-content: center;
position: relative;
text-align: center
}
.loading .line {
position: absolute;
width: 450rpx;
left: 150rpx;
top: 50rpx;
height: 1px;
border-top: 1px solid #eee
position: absolute;
width: 450rpx;
left: 150rpx;
top: 50rpx;
height: 1px;
border-top: 1px solid #eee
}
.loading .text {
position: relative;
display: inline-block;
padding: 0 20rpx;
background: #fff;
z-index: 2;
color: #777
position: relative;
display: inline-block;
padding: 0 20rpx;
background: #fff;
z-index: 2;
color: #777
}
.loadingicon .loading {
animation: load linear 1s infinite;
font-size: 45rpx;
color: #000
animation: load linear 1s infinite;
font-size: 45rpx;
color: #000
}
.loadingicon {
width: 100%;
height: 80rpx;
overflow: hidden
width: 100%;
height: 80rpx;
overflow: hidden
}

44
static/css/theme.scss Normal file
View File

@ -0,0 +1,44 @@
// 此文件为uView的主题变量这些变量目前只能通过uni.scss引入才有效另外由于
// uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中造成微信程序包太大
// 故uni.scss只建议放scss变量名相关样式其他的样式可以通过main.js或者App.vue引入
$u-main-color: #303133;
$u-content-color: #606266;
$u-tips-color: #909193;
$u-light-color: #c0c4cc;
$u-border-color: #dadbde;
$u-bg-color: #f3f4f6;
$u-disabled-color: #c8c9cc;
$u-primary: #32BB3B;
$u-primary-dark: #398ade;
$u-primary-disabled: #9acafc;
$u-primary-light: #ecf5ff;
$u-warning: #f9ae3d;
$u-warning-dark: #f1a532;
$u-warning-disabled: #f9d39b;
$u-warning-light: #fdf6ec;
$u-success: #5ac725;
$u-success-dark: #53c21d;
$u-success-disabled: #a9e08f;
$u-success-light: #f5fff0;
$u-error: #f56c6c;
$u-error-dark: #e45656;
$u-error-disabled: #f7b2b2;
$u-error-light: #fef0f0;
$u-info: #909399;
$u-info-dark: #767a82;
$u-info-disabled: #c4c6c9;
$u-info-light: #f4f4f5;
// scss混入为了少写几行#ifndef
@mixin flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: $direction;
}

BIN
static/empty/goodsEmpty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
static/images/gban.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/images/greenLine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/images/pointer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -11,9 +11,10 @@
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
@import '@/uni_modules/uview-ui/theme.scss';
@import '@/static/css/theme.scss';
/* 颜色变量 */
$uni-theme-color: #f45846;
$uni-newTheme-color: #38BE41;
$uni-theme-bg-color: linear-gradient(180deg, #f98649 0%, #f34e45 100%);
/* 行为相关颜色 */

View File

@ -6,8 +6,8 @@
<view class="uni-select__input-box" @click="toggleSelector">
<view v-if="current" class="uni-select__input-text">{{current}}</view>
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
<view v-if="current && clear && !disabled" @click.stop="clearVal" >
<uni-icons type="clear" color="#c0c4cc" size="24"/>
<view v-if="current && clear && !disabled" @click.stop="clearVal">
<uni-icons type="clear" color="#c0c4cc" size="24" />
</view>
<view v-else>
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
@ -20,9 +20,10 @@
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
<text>{{emptyTips}}</text>
</view>
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
@click="change(item)">
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
:key="index" @click="change(item)">
<text
:class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
</view>
</scroll-view>
</view>
@ -125,7 +126,7 @@
common + placeholder :
common
},
valueCom(){
valueCom() {
// #ifdef VUE3
return this.modelValue;
// #endif
@ -156,7 +157,7 @@
}
},
methods: {
debounce(fn, time = 100){
debounce(fn, time = 100) {
let timer = null
return function(...args) {
if (timer) clearTimeout(timer)
@ -166,11 +167,11 @@
}
},
//
query(){
query() {
this.mixinDatacomEasyGet();
},
//
onMixinDatacomPropsChange(){
onMixinDatacomPropsChange() {
if (this.collection) {
this.debounceGet();
}
@ -193,9 +194,9 @@
}
defValue = defItem
}
if (defValue || defValue === 0) {
this.emit(defValue)
}
if (defValue || defValue === 0) {
this.emit(defValue)
}
}
const def = this.mixinDatacomResData.find(item => item.value === defValue)
this.current = def ? this.formatItemName(def) : ''
@ -258,7 +259,7 @@
let str = "";
str = this.format;
for (let key in item) {
str = str.replace(new RegExp(`{${key}}`,"g"),item[key]);
str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
}
return str;
} else {
@ -272,26 +273,26 @@
}
},
//
getLoadData(){
getLoadData() {
return this.mixinDatacomResData;
},
// key
getCurrentCacheKey(){
getCurrentCacheKey() {
return this.collection;
},
//
getCache(name=this.getCurrentCacheKey()){
getCache(name = this.getCurrentCacheKey()) {
let cacheData = uni.getStorageSync(this.cacheKey) || {};
return cacheData[name];
},
//
setCache(value, name=this.getCurrentCacheKey()){
setCache(value, name = this.getCurrentCacheKey()) {
let cacheData = uni.getStorageSync(this.cacheKey) || {};
cacheData[name] = value;
uni.setStorageSync(this.cacheKey, cacheData);
},
//
removeCache(name=this.getCurrentCacheKey()){
removeCache(name = this.getCurrentCacheKey()) {
let cacheData = uni.getStorageSync(this.cacheKey) || {};
delete cacheData[name];
uni.setStorageSync(this.cacheKey, cacheData);
@ -431,6 +432,7 @@
max-height: 600px;
}
}
/* #endif */
.uni-select__selector-empty,
@ -514,4 +516,4 @@
left: 0;
z-index: 2;
}
</style>
</style>

View File

@ -1,51 +1,23 @@
<template>
<u-popup
:show="show"
@close="closeHandler"
>
<u-popup :show="show" @close="closeHandler">
<view class="u-picker">
<u-toolbar
v-if="showToolbar"
:cancelColor="cancelColor"
:confirmColor="confirmColor"
:cancelText="cancelText"
:confirmText="confirmText"
:title="title"
@cancel="cancel"
@confirm="confirm"
></u-toolbar>
<picker-view
class="u-picker__view"
:indicatorStyle="`height: ${$u.addUnit(itemHeight)}`"
:value="innerIndex"
:immediateChange="immediateChange"
:style="{
<u-toolbar v-if="showToolbar" :cancelColor="cancelColor" :confirmColor="confirmColor"
:cancelText="cancelText" :confirmText="confirmText" :title="title" @cancel="cancel"
@confirm="confirm"></u-toolbar>
<picker-view class="u-picker__view" :indicatorStyle="`height: ${$u.addUnit(itemHeight)}`"
:value="innerIndex" :immediateChange="immediateChange" :style="{
height: `${$u.addUnit(visibleItemCount * itemHeight)}`
}"
@change="changeHandler"
>
<picker-view-column
v-for="(item, index) in innerColumns"
:key="index"
class="u-picker__view__column"
>
<text
v-if="$u.test.array(item)"
class="u-picker__view__column__item u-line-1"
v-for="(item1, index1) in item"
:key="index1"
:style="{
}" @change="changeHandler">
<picker-view-column v-for="(item, index) in innerColumns" :key="index" class="u-picker__view__column">
<text v-if="$u.test.array(item)" class="u-picker__view__column__item u-line-1"
v-for="(item1, index1) in item" :key="index1" :style="{
height: $u.addUnit(itemHeight),
lineHeight: $u.addUnit(itemHeight),
fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
}"
>{{ getItemText(item1) }}</text>
}">{{ getItemText(item1) }}</text>
</picker-view-column>
</picker-view>
<view
v-if="loading"
class="u-picker--loading"
>
<view v-if="loading" class="u-picker--loading">
<u-loading-icon mode="circle"></u-loading-icon>
</view>
</view>
@ -53,184 +25,184 @@
</template>
<script>
/**
* u-picker
* @description 选择器
* @property {Boolean} show 是否显示picker弹窗默认 false
* @property {Boolean} showToolbar 是否显示顶部的操作栏默认 true
* @property {String} title 顶部标题
* @property {Array} columns 对象数组设置每一列的数据
* @property {Boolean} loading 是否显示加载中状态默认 false
* @property {String | Number} itemHeight 各列中单个选项的高度默认 44
* @property {String} cancelText 取消按钮的文字默认 '取消'
* @property {String} confirmText 确认按钮的文字默认 '确定'
* @property {String} cancelColor 取消按钮的颜色默认 '#909193'
* @property {String} confirmColor 确认按钮的颜色默认 '#3c9cff'
* @property {String | Number} visibleItemCount 每列中可见选项的数量默认 5
* @property {String} keyName 选项对象中需要展示的属性键名默认 'text'
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器默认 false
* @property {Array} defaultIndex 各列的默认索引
* @property {Boolean} immediateChange 是否在手指松开时立即触发change事件默认 false
* @event {Function} close 关闭选择器时触发
* @event {Function} cancel 点击取消按钮触发
* @event {Function} change 当选择值变化时触发
* @event {Function} confirm 点击确定按钮返回当前选择的值
*/
import props from './props.js';
export default {
name: 'u-picker',
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
//
lastIndex: [],
// picker-viewvalue
innerIndex: [],
//
innerColumns: [],
//
columnIndex: 0,
}
},
watch: {
//
defaultIndex: {
immediate: true,
handler(n) {
this.setIndexs(n, true)
/**
* u-picker
* @description 选择器
* @property {Boolean} show 是否显示picker弹窗默认 false
* @property {Boolean} showToolbar 是否显示顶部的操作栏默认 true
* @property {String} title 顶部标题
* @property {Array} columns 对象数组设置每一列的数据
* @property {Boolean} loading 是否显示加载中状态默认 false
* @property {String | Number} itemHeight 各列中单个选项的高度默认 44
* @property {String} cancelText 取消按钮的文字默认 '取消'
* @property {String} confirmText 确认按钮的文字默认 '确定'
* @property {String} cancelColor 取消按钮的颜色默认 '#909193'
* @property {String} confirmColor 确认按钮的颜色默认 '#3c9cff'
* @property {String | Number} visibleItemCount 每列中可见选项的数量默认 5
* @property {String} keyName 选项对象中需要展示的属性键名默认 'text'
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器默认 false
* @property {Array} defaultIndex 各列的默认索引
* @property {Boolean} immediateChange 是否在手指松开时立即触发change事件默认 false
* @event {Function} close 关闭选择器时触发
* @event {Function} cancel 点击取消按钮触发
* @event {Function} change 当选择值变化时触发
* @event {Function} confirm 点击确定按钮返回当前选择的值
*/
import props from './props.js';
export default {
name: 'u-picker',
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
data() {
return {
//
lastIndex: [],
// picker-viewvalue
innerIndex: [],
//
innerColumns: [],
//
columnIndex: 0,
}
},
// columns
columns: {
immediate: true,
handler(n) {
this.setColumns(n)
}
},
},
methods: {
// item
getItemText(item) {
if (uni.$u.test.object(item)) {
return item[this.keyName]
} else {
return item
}
},
//
closeHandler() {
if (this.closeOnClickOverlay) {
this.$emit('close')
}
},
//
cancel() {
this.$emit('cancel')
},
//
confirm() {
this.$emit('confirm', {
indexs: this.innerIndex,
value: this.innerColumns.map((item, index) => item[this.innerIndex[index]]),
values: this.innerColumns
})
},
//
changeHandler(e) {
const {
value
} = e.detail
let index = 0,
columnIndex = 0
//
for (let i = 0; i < value.length; i++) {
let item = value[i]
if (item !== (this.lastIndex[i] || 0)) { // undefined0
// columnIndex
columnIndex = i
// index
index = item
break // 使
watch: {
//
defaultIndex: {
immediate: true,
handler(n) {
this.setIndexs(n, true)
}
}
this.columnIndex = columnIndex
const values = this.innerColumns
// ""
this.setLastIndex(value)
this.setIndexs(value)
},
// columns
columns: {
immediate: true,
handler(n) {
this.setColumns(n)
}
},
},
methods: {
// item
getItemText(item) {
if (uni.$u.test.object(item)) {
return item[this.keyName]
} else {
return item
}
},
//
closeHandler() {
if (this.closeOnClickOverlay) {
this.$emit('close')
}
},
//
cancel() {
this.$emit('cancel')
},
//
confirm() {
this.$emit('confirm', {
indexs: this.innerIndex,
value: this.innerColumns.map((item, index) => item[this.innerIndex[index]]),
values: this.innerColumns
})
},
//
changeHandler(e) {
const {
value
} = e.detail
let index = 0,
columnIndex = 0
//
for (let i = 0; i < value.length; i++) {
let item = value[i]
if (item !== (this.lastIndex[i] || 0)) { // undefined0
// columnIndex
columnIndex = i
// index
index = item
break // 使
}
}
this.columnIndex = columnIndex
const values = this.innerColumns
// ""
this.setLastIndex(value)
this.setIndexs(value)
this.$emit('change', {
// #ifndef MP-WEIXIN || MP-LARK
// this
picker: this,
// #endif
value: this.innerColumns.map((item, index) => item[value[index]]),
index,
indexs: value,
// values
values,
columnIndex
})
},
// index
setIndexs(index, setLastIndex) {
this.innerIndex = uni.$u.deepClone(index)
if (setLastIndex) {
this.setLastIndex(index)
}
},
//
setLastIndex(index) {
// changeHandler
//
this.lastIndex = uni.$u.deepClone(index)
},
//
setColumnValues(columnIndex, values) {
// innerColumnscolumnIndexvalues使splice
this.innerColumns.splice(columnIndex, 1, values)
// innerIndex0
let tmpIndex = uni.$u.deepClone(this.innerIndex)
for (let i = 0; i < this.innerColumns.length; i++) {
if (i > this.columnIndex) {
tmpIndex[i] = 0
this.$emit('change', {
// #ifndef MP-WEIXIN || MP-LARK
// this
picker: this,
// #endif
value: this.innerColumns.map((item, index) => item[value[index]]),
index,
indexs: value,
// values
values,
columnIndex
})
},
// index
setIndexs(index, setLastIndex) {
this.innerIndex = uni.$u.deepClone(index)
if (setLastIndex) {
this.setLastIndex(index)
}
}
//
this.setIndexs(tmpIndex)
},
//
getColumnValues(columnIndex) {
// changesetColumnValues
// changegetColumnValues
(async () => {
await uni.$u.sleep()
})()
return this.innerColumns[columnIndex]
},
// columns
setColumns(columns) {
this.innerColumns = uni.$u.deepClone(columns)
// defaultIndex0
if (this.innerIndex.length === 0) {
this.innerIndex = new Array(columns.length).fill(0)
},
//
setLastIndex(index) {
// changeHandler
//
this.lastIndex = uni.$u.deepClone(index)
},
//
setColumnValues(columnIndex, values) {
// innerColumnscolumnIndexvalues使splice
this.innerColumns.splice(columnIndex, 1, values)
// innerIndex0
let tmpIndex = uni.$u.deepClone(this.innerIndex)
for (let i = 0; i < this.innerColumns.length; i++) {
if (i > this.columnIndex) {
tmpIndex[i] = 0
}
}
//
this.setIndexs(tmpIndex)
},
//
getColumnValues(columnIndex) {
// changesetColumnValues
// changegetColumnValues
(async () => {
await uni.$u.sleep()
})()
return this.innerColumns[columnIndex]
},
// columns
setColumns(columns) {
this.innerColumns = uni.$u.deepClone(columns)
// defaultIndex0
if (this.innerIndex.length === 0) {
this.innerIndex = new Array(columns.length).fill(0)
}
},
//
getIndexs() {
return this.innerIndex
},
//
getValues() {
// changesetColumnValues
// changegetValues
(async () => {
await uni.$u.sleep()
})()
return this.innerColumns.map((item, index) => item[this.innerIndex[index]])
}
},
//
getIndexs() {
return this.innerIndex
},
//
getValues() {
// changesetColumnValues
// changegetValues
(async () => {
await uni.$u.sleep()
})()
return this.innerColumns.map((item, index) => item[this.innerIndex[index]])
}
},
}
}
</script>
<style lang="scss" scoped>
@ -280,4 +252,4 @@ export default {
z-index: 1000;
}
}
</style>
</style>

View File

@ -10,7 +10,7 @@ $u-border-color: #dadbde;
$u-bg-color: #f3f4f6;
$u-disabled-color: #c8c9cc;
$u-primary: #3c9cff;
$u-primary: #32BB3B;
$u-primary-dark: #398ade;
$u-primary-disabled: #9acafc;
$u-primary-light: #ecf5ff;

View File

@ -590,28 +590,27 @@ export default {
*/
uploadImageOne: function(opt, successCallback, errorCallback) {
let that = this;
let obj = {};
let obj = {};
if (typeof opt === 'string') {
let url = opt;
opt = {};
opt.url = url;
}else {
opt.crop ? obj.crop = opt.crop : null;
}
} else {
opt.crop ? obj.crop = opt.crop : null;
}
let count = opt.count || 1,
sizeType = opt.sizeType || ['compressed'],
sourceType = opt.sourceType || ['album', 'camera'],
is_load = opt.is_load || true,
uploadUrl = opt.url || '',
inputName = opt.name || 'field';
uni.chooseImage({
count: count, //最多可以选择的图片总数
sizeType: sizeType, // 可以指定是原图还是压缩图,默认二者都有
sourceType: sourceType, // 可以指定来源是相册还是相机,默认二者都有
...obj,
...obj,
success: function(res) {
console.log(res);
console.log(res);
//启动上传等待中...
uni.showLoading({
title: '图片上传中',
@ -657,6 +656,83 @@ export default {
}
})
},
/*
* 多上传
* @param object opt
* @param callable successCallback 成功执行方法 data
* @param callable errorCallback 失败执行方法
*/
uploadImages: function(opt, successCallback, errorCallback) {
let that = this;
let obj = {};
if (typeof opt === 'string') {
let url = opt;
opt = {};
opt.url = url;
} else {
opt.crop ? obj.crop = opt.crop : null;
}
let count = opt.count || 1,
sizeType = opt.sizeType || ['compressed'],
sourceType = opt.sourceType || ['album', 'camera'],
is_load = opt.is_load || true,
uploadUrl = opt.url || '',
inputName = opt.name || 'field';
uni.chooseImage({
count: count, //最多可以选择的图片总数
sizeType: sizeType, // 可以指定是原图还是压缩图,默认二者都有
sourceType: sourceType, // 可以指定来源是相册还是相机,默认二者都有
...obj,
success: function(res) {
//启动上传等待中...
uni.showLoading({
title: '图片上传中',
});
res.tempFilePaths.forEach((item, index) => {
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/' + uploadUrl + '/' + inputName,
filePath: item,
name: inputName,
formData: {
'filename': inputName
},
header: {
// #ifdef MP
"Content-Type": "multipart/form-data",
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: function(res) {
uni.hideLoading();
if (res.statusCode == 403) {
that.Tips({
title: res.data
});
} else {
let data = res.data ? JSON.parse(res.data) : {};
if (data.status == 200) {
successCallback && successCallback(data)
} else {
errorCallback && errorCallback(data);
that.Tips({
title: data.message
});
}
}
},
fail: function(res) {
uni.hideLoading();
that.Tips({
title: '上传图片失败'
});
}
})
})
}
})
},
/**
* 小程序头像获取上传
* @param uploadUrl 上传接口地址