界面更新

This commit is contained in:
jia 2023-10-07 10:03:29 +08:00
parent 3b71a23fbc
commit 6ba160e97f
18 changed files with 1302 additions and 1245 deletions

22
App.vue
View File

@ -15,9 +15,15 @@
import { import {
checkLogin checkLogin
} from "./libs/login"; } from "./libs/login";
import {
getUserInfo
} from '@/api/user.js';
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
} from './config/app'; } from './config/app';
import { import {
getconfig, getconfig,
history history
@ -79,14 +85,14 @@
let appkey = uni.getStorage({ let appkey = uni.getStorage({
key: 'launchFlag' key: 'launchFlag'
}) })
if (appkey) {
setTimeout(() => { if (option.referrerInfo?.extraData?.uniMP) {
this.$store.dispatch('INIT_CONFIG'); uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
}, 6000) uni.setStorageSync('APP_token', option.referrerInfo?.extraData?.token);
}
// #ifdef APP-PLUS
}
// #ifdef APP-PLUS
// #endif // #endif
let that = this; let that = this;
@ -204,7 +210,7 @@
// if (info.referrerInfo?.extraData?.uniMP) { // if (info.referrerInfo?.extraData?.uniMP) {
// uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP); // uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
// uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token); // uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token);
// } // }

View File

@ -83,6 +83,7 @@
"path": "pages/moreProject/moreProject", "path": "pages/moreProject/moreProject",
"style": { "style": {
"navigationBarTitleText": "更多功能", "navigationBarTitleText": "更多功能",
"navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -103,12 +104,11 @@
"path" : "pages/margin/margin", "path" : "pages/margin/margin",
"style" : "style" :
{ {
"navigationBarTitleText": "保证金缴纳", "navigationBarTitleText": "缴纳保证金",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
// { // {
// "path": "pages/gather/gather", // "path": "pages/gather/gather",
// "style": { // "style": {

View File

@ -376,8 +376,11 @@
/*核销订单*/ /*核销订单*/
goCancellation() { goCancellation() {
let that = this; let that = this;
// uni.navigateTo({
// url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code,
// })
uni.navigateTo({ uni.navigateTo({
url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code, url: `/pages/admin/order_cancellation/index?mer_id=${that.mer_id}`
}) })
// uni.showModal({ // uni.showModal({
// title: '', // title: '',

View File

@ -553,6 +553,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}` url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
}) })
}, },
toRefundDetail(item) { toRefundDetail(item) {
uni.navigateTo({ uni.navigateTo({

View File

@ -5,9 +5,10 @@
<view class="back" @click='set_where(1)'> <view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text> <view class='input acea-row row-between-wrapper'>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" <text class='iconfont icon-sousuo'></text>
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input> <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit" @input="inputChange">
</view> </view>
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont' <view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view> :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>

View File

@ -241,7 +241,7 @@
<image src="@/static/images/close.png" mode=""></image> <image src="@/static/images/close.png" mode=""></image>
</view> </view>
<form report-submit='true' style="height: 90%;"> <form report-submit='true' style="height: 100%;">
<view class='merchantsSettled' :style="{'height':Fheight}"> <view class='merchantsSettled' :style="{'height':Fheight}">
<view class="title">填写信息</view> <view class="title">填写信息</view>
<view class='list'> <view class='list'>
@ -254,7 +254,6 @@
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<text class="item-name">联系电话:</text> <text class="item-name">联系电话:</text>
@ -865,7 +864,11 @@
}, },
// //
navation(item) { navation(item) {
if(item.type==8){
uni.navigateTo({
url: '/pages/moreProject/moreProject'
})
}
if (this.userid) { if (this.userid) {
if (this.userInfoData.mer_info.setting_status == 1) { if (this.userInfoData.mer_info.setting_status == 1) {
switch (item.type) { switch (item.type) {
@ -913,11 +916,7 @@
}) })
break; break;
case 8:
uni.navigateTo({
url: '/pages/moreProject/moreProject'
})
break;
} }
} else { } else {

View File

@ -1,60 +1,64 @@
<template> <template>
<view class=""> <view class="">
<view class="info"> <view class="info">
<view class="bg"></view> <view class="bg"></view>
<view class="card"> <view class="card">
<view class="title">店铺保证金信息</view> <view class="title">店铺保证金信息</view>
<view class="item"> <view class="item">
<text>已缴纳保证金</text> <text>已缴纳保证金</text>
<text>{{merchant_Data.paid_margin}}</text> <text>{{merchant_Data.paid_margin}}</text>
</view>
<view class="item">
<text>剩余缴纳保证金</text>
<text>{{merchant_Data.unpaid_margin}}</text>
</view>
<view class="item">
<text>缴纳店铺账户</text>
<text>{{merchant_Data.mer_name}}</text>
</view>
</view>
</view> </view>
<view class="item"> <view class="price">
<text>缴纳店铺账户</text> <view class="title">缴纳金额</view>
<text>{{merchant_Data.mer_name}}</text> <view class="tab">
</view> <view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view> </view>
</view> <button class="btn" @click="paydecimal">缴纳</button>
<view class="price"> </view>
<view class="title">缴纳金额</view> <!-- <view class="tip">
<view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view>
<button class="btn" @click="paydecimal">缴纳</button>
</view>
<!-- <view class="tip">
<view class="title">注意事项</view> <view class="title">注意事项</view>
<view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text> <view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text>
</view> </view>
</view> --> </view> -->
<view class="content-order" v-for="(item,i ) in productList"> <view class="content-order" v-for="(item,i ) in productList">
<view class="">订单编号{{item.order_sn}}</view> <view class="">订单编号{{item.order_sn}}</view>
<view class="">支付金额{{item.total_price}}</view> <view class="">支付金额{{item.total_price}}</view>
<view class="">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view> <view class="">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view>
<view class="">支付时间{{item.pay_time}}</view> <view class="">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
</template> </template>
<script> <script>
import { import {
merchant, merchant,
paymerchant, paymerchant,
marginlist marginlist
} from '@/api/api.js' } from '@/api/api.js'
export default { export default {
data() { data() {
return { return {
mer_id:0, mer_id: 0,
merchant_Data: {}, merchant_Data: {},
where:{ where: {
page:1, page: 1,
limit:10 limit: 10
}, },
productList:[], productList: [],
loadend: false, loadend: false,
loading: false, loading: false,
loadTitle: '加载更多', loadTitle: '加载更多',
@ -63,26 +67,26 @@
onLoad(e) { onLoad(e) {
this.mer_id = e.mer_id this.mer_id = e.mer_id
this.decimal() this.decimal()
this.list(false) this.list(true)
}, },
onReachBottom() { onReachBottom() {
if (this.productList.length > 0) { if (this.productList.length > 0) {
setTimeout(() => { setTimeout(() => {
this.list(false); this.list(false);
}, 1000) }, 1000)
} }
}, },
methods: { methods: {
list(isPage){ list(isPage) {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []); if (isPage === true) that.$set(that, 'productList', []);
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
marginlist(that.where).then(res => { marginlist(that.where).then(res => {
let list = res.data.list; let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList); let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit; let loadend = list.length < that.where.limit;
@ -92,15 +96,15 @@
setTimeout(() => { setTimeout(() => {
that.$set(that, 'productList', productList); that.$set(that, 'productList', productList);
}, 500) }, 500)
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1); that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => { }).catch(err => {
that.loading = false; that.loading = false;
that.loadTitle = '加载更多'; that.loadTitle = '加载更多';
}); });
}, },
// //
decimal() { decimal() {
@ -117,23 +121,32 @@
title: '暂时无需缴纳保证金' title: '暂时无需缴纳保证金'
}); });
} else { } else {
let that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金', content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
success: function(res) { success: (res) => {
if (res.confirm) { if (res.confirm) {
// console.log(''); // console.log('');
paymerchant().then((res) => { paymerchant().then((res) => {
console.log(res.data)
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
orderInfo: res.data orderInfo: res.data
.config, // .config, //
success: function(res) { success: (res) => {
console.log('success:' + JSON.stringify(res)); this.$util.Tips({
title: '支付成功'
});
this.decimal()
this.list(true)
}, },
fail: function(err) { fail: (err) => {
this.$util.Tips({
title: '支付失败'
});
console.log('fail:' + JSON.stringify(err)); console.log('fail:' + JSON.stringify(err));
} }
}); });
@ -145,9 +158,9 @@
} }
} }
}); });
} }
}, },
} }
} }
@ -157,172 +170,176 @@
</style> </style>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #fff; background-color: #fff;
}
.content-order{
background: #F4F4F4;
border-radius: 21rpx 21rpx ;
margin-top: 30rpx;
padding: 10rpx;
margin-left: 10rpx;
margin-right: 10rpx;
view{
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin: 20rpx;
} }
}
.info {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
height: 250rpx;
.bg { .content-order {
background-color: #FF5C2D;
height: 170rpx;
width: 100vw;
border-radius: 0rpx 0rpx 28rpx 28rpx;
position: absolute;
top: 0;
left: 0;
}
.card {
width: 694rpx;
min-height: 180rpx;
background: #FFFFFF;
margin-top: 38.55rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
position: absolute;
top: 0;
.title { background: #F4F4F4;
font-size: 32rpx; border-radius: 21rpx 21rpx;
font-weight: 600; margin-top: 30rpx;
color: #333333; padding: 10rpx;
padding-bottom: 10rpx; margin-left: 10rpx;
} margin-right: 10rpx;
.item { view {
display: flex; font-size: 30rpx;
justify-content: space-between; font-family: PingFang SC-Regular, PingFang SC;
font-size: 32rpx; font-weight: 400;
font-weight: 400; color: #333333;
color: #333333; margin: 20rpx;
margin-bottom: 10rpx;
text:nth-child(1){
flex-shrink: 0;
margin-right: 18rpx;
}
}
}
}
.price { }
display: flex; }
flex-direction: column;
padding: 0 28rpx;
margin-top: 50rpx;
.title { .info {
font-size: 32rpx; display: flex;
font-weight: 600; flex-direction: column;
color: #333333; align-items: center;
line-height: 39rpx; position: relative;
margin-bottom: 42rpx; height: 250rpx;
}
.tab { .bg {
display: flex; background-color: #FF5C2D;
flex-wrap: wrap; height: 170rpx;
justify-content: left; width: 100vw;
width: 694rpx; border-radius: 0rpx 0rpx 28rpx 28rpx;
position: absolute;
top: 0;
left: 0;
}
.item { .card {
width: 217rpx; width: 694rpx;
height: 131rpx; min-height: 180rpx;
margin: 0 auto; background: #FFFFFF;
margin-bottom: 20rpx; margin-top: 38.55rpx;
border-radius: 7rpx 7rpx 7rpx 7rpx; box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border: 2rpx solid #F5F5F5; border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex; opacity: 1;
justify-content: center; padding: 31.5rpx 28rpx;
align-items: center; display: flex;
font-size: 32rpx; flex-direction: column;
font-weight: 500; justify-content: space-around;
line-height: 32rpx; position: absolute;
} top: 0;
.active { .title {
border: 2rpx solid #FF5C2D; font-size: 32rpx;
color: #FF5C2D; font-weight: 600;
} color: #333333;
} padding-bottom: 10rpx;
}
.input { .item {
width: 100%; display: flex;
height: 112rpx; justify-content: space-between;
background: #F5F5F5; font-size: 32rpx;
border-radius: 56rpx 56rpx 56rpx 56rpx; font-weight: 400;
opacity: 1; color: #333333;
padding: 0 45.56rpx; margin-bottom: 10rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.btn { text:nth-child(1) {
width: 694rpx; flex-shrink: 0;
height: 84rpx; margin-right: 18rpx;
margin-top: 73.6rpx; }
background: #FF5C2D; }
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5; }
border-radius: 42rpx 42rpx 42rpx 42rpx; }
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #FFFFFF;
}
}
.tip { .price {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0 28rpx; padding: 0 28rpx;
margin-top: 84rpx; margin-top: 85rpx;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 600;
color: #FF5C2D; color: #333333;
line-height: 32rpx; line-height: 39rpx;
margin-bottom: 21rpx; margin-bottom: 42rpx;
} }
.text { .tab {
font-size: 28rpx; display: flex;
font-weight: 400; flex-wrap: wrap;
color: rgba(0, 0, 0, 0.6); justify-content: left;
line-height: 42rpx; width: 694rpx;
-webkit-background-clip: text;
} .item {
} width: 217rpx;
height: 131rpx;
margin: 0 auto;
margin-bottom: 20rpx;
border-radius: 7rpx 7rpx 7rpx 7rpx;
border: 2rpx solid #F5F5F5;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
}
.active {
border: 2rpx solid #FF5C2D;
color: #FF5C2D;
}
}
.input {
width: 100%;
height: 112rpx;
background: #F5F5F5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.btn {
width: 694rpx;
height: 84rpx;
margin-top: 73.6rpx;
background: #FF5C2D;
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #FFFFFF;
}
}
.tip {
display: flex;
flex-direction: column;
padding: 0 28rpx;
margin-top: 84rpx;
.title {
font-size: 32rpx;
font-weight: 500;
color: #FF5C2D;
line-height: 32rpx;
margin-bottom: 21rpx;
}
.text {
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.6);
line-height: 42rpx;
-webkit-background-clip: text;
}
}
</style> </style>

View File

@ -459,7 +459,7 @@
<image src="@/static/images/close.png" mode=""></image> <image src="@/static/images/close.png" mode=""></image>
</view> </view>
<form report-submit='true' style="height: 90%;"> <form report-submit='true' style="height: 100%;">
<view class='merchantsSettled' :style="{'height':Fheight}"> <view class='merchantsSettled' :style="{'height':Fheight}">
<view class="title">填写信息</view> <view class="title">填写信息</view>
<view class='list'> <view class='list'>
@ -897,10 +897,16 @@
} }
} }
} else { } else {
if(t=='商品管理'){
uni.navigateTo({ uni.switchTab({
url: url url: url
}) })
}else{
uni.navigateTo({
url: url
})
}
} }
}, },
getUserInfo: function() { getUserInfo: function() {

View File

@ -32,7 +32,7 @@
getProductContent(obj) { getProductContent(obj) {
// console.log(obj); // console.log(obj);
this.goodsDis = obj; this.goodsDis = obj;
this.a=obj.store_name this.a=obj.store_name;
}, },
save() { save() {
setStorage('goodsDis', this.goodsDis); setStorage('goodsDis', this.goodsDis);

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
} }
} }
.tip { .tip {
padding: 16rpx 0 0 40rpx; padding: 16rpx 0 0 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #e93323; color: #e93323;
display: flex; display: flex;
@ -36,6 +36,14 @@
width: 710rpx; width: 710rpx;
font-size: 30rpx; font-size: 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
.icon_top{
transform: rotate(-90deg);
}
.icon_bottom{
transform: rotate(90deg);
}
.popup_group_item { .popup_group_item {
padding: 32rpx 30rpx; padding: 32rpx 30rpx;
display: flex; display: flex;

View File

@ -1,112 +1,118 @@
<template> <template>
<view class=" writeBg "> <view>
<view class="container_input marginTop_none"> <block v-if="showComponent">
<view class="container_input_item"> <view class=" writeBg ">
<view class="container_input_item_label"><span>是否推荐</span></view> <view class="container_input marginTop_none">
<view class="container_input_item_value"> <view class="container_input_item">
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)" <view class="container_input_item_label"><span>是否推荐</span></view>
@change="isGood" /> <view class="container_input_item_value">
</view> <switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)"
</view> @change="isGood" />
<view class="container_input_item">
<view class="container_input_item_label"><span>是否开启礼包</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGiftBag" />
</view>
</view>
</view>
<view class="tip">
<span class="iconfont">&#xe688;</span>
<span>开启后此商品只能在分销礼包中展示并销售</span>
</view>
<view class="container_input marginTop_none">
<view class="container_input_item">
<view class="container_input_item_label"><span>限购数量</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
placeholder-class="inputPlaceHolder" />
</view>
</view>
<view class="container_input_item">
<view class="container_input_item_label"><span>商品排序</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
placeholder-class="inputPlaceHolder" />
</view>
</view>
</view>
<view class="content_list">
<view class="content_list_item" @click="inputGoodsDetils">
<view>商品详情</view>
<view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view>
</view>
<view class="content_list_video">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png" style=" width:150rpx" ></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view> </view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view> </view>
<view class="container_input_item">
<view class="container_input_item_label"><span>是否开启礼包</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGiftBag" />
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view> </view>
<view>添加视频</view>
</view> </view>
</view> </view>
</view> <view class="tip">
</view> <span class="iconfont">&#xe688;</span>
<view v-if="showVideo" class="video-count"> <span>开启后此商品只能在分销礼包中展示并销售</span>
<!--#ifndef APP-PLUS--> </view>
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video> <view class="container_input marginTop_none">
<!--#endif--> <view class="container_input_item">
<!--#ifdef APP-PLUS--> <view class="container_input_item_label"><span>限购数量</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
placeholder-class="inputPlaceHolder" />
</view>
</view>
<view class="container_input_item">
<view class="container_input_item_label"><span>商品排序</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
placeholder-class="inputPlaceHolder" />
</view>
</view>
</view>
<view class="content_list">
<view class="content_list_item" @click="inputGoodsDetils">
<view>商品详情</view>
<view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view>
</view>
<view class="content_list_video">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
style=" width:150rpx"></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view>
<video id="myVideo" class="videoLink" autoplay loop <!--#ifndef APP-PLUS-->
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video> <view style="position: absolute;">
<!--#endif--> <view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view>
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加视频</view>
</view>
</view>
</view>
</view>
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<view class="handle dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view> </block>
<view class="handle dobuButton"> <view class="handle_button" @click="submitCreatedGoods">提交</view>
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
</view> </view>
</template> </template>
<script> <script>
@ -148,7 +154,8 @@
}, },
data() { data() {
return { return {
showVideo:false, showComponent: false,
showVideo: false,
disModel: false, disModel: false,
upload_max: 10, upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
@ -166,7 +173,7 @@
// console.log('123'); // console.log('123');
this.initData(); this.initData();
}, },
watch: { watch: {
addGoodsSecoundData: { addGoodsSecoundData: {
handler(val) { handler(val) {
@ -184,16 +191,16 @@
} }
}, },
methods: { methods: {
videoshow() { videoshow() {
this.showVideo = true this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this); this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => { this.$nextTick(() => {
this.videoContext.play(); this.videoContext.play();
}) })
// this.video_link = this.formData.video_link; // this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 }); // this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true; // this.videoContext.play(); this.videoplay = true;
}, },
initData() { initData() {
let editGoodsDetils = {}; let editGoodsDetils = {};
if (getStorage('goodsDis')) { if (getStorage('goodsDis')) {
@ -235,7 +242,7 @@
submitCreatedGoods() { submitCreatedGoods() {
Loading(); Loading();
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData', let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound' 'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound', 'editCommodity'
]; ];
let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] : let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] :
getStorage('attrValue'); getStorage('attrValue');
@ -248,12 +255,25 @@
}, },
video_link: this.addGoodsSecoundData.video_link video_link: this.addGoodsSecoundData.video_link
}; };
if (attrValue) {
if(attrValue){ postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue = attrValue.filter(item => item != ''); postData.attrValue[0].bar_code
postData.attrValue[0].bar_code }
} let info = getStorage('editCommodity');
// console.log(postData); Object.keys(info).forEach(key=>{
postData[key]=info[key];
})
postData.stock = postData.attrValue[0].stock;
console.log(postData);
if(postData.store_name.trim().length<=0)return Toast('请输入商品名称');
if(postData.imageList.length<=0)return Toast('请上传商品图片');
if(postData.cate_name.trim().length<=0)return Toast('请选择平台分类');
if(postData.unit_name.trim().length<=0)return Toast('请输入商品单位');
if(!postData.attrValue[0].price||postData.attrValue[0].price<0)return Toast('价格不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
if(postData.content.title.trim().length<=0)return Toast('请输入商品详情');
if(postData.content.image.length<=0)return Toast('请上传商品图片');
// return Toast('');
if (getStorage('addGoodsFormData').spec_type == 0) { if (getStorage('addGoodsFormData').spec_type == 0) {
// postData.attr = [getStorage('singleSpecification')]; // postData.attr = [getStorage('singleSpecification')];
} }
@ -269,7 +289,7 @@
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false showCancel: false
}).then(() => { }).then(() => {
uni.removeStorageSync('singleSpecification') uni.removeStorageSync('singleSpecification')
uni.redirectTo({ uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
}) })
@ -322,8 +342,8 @@
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
success: res => { success: res => {
console.log(res) console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) { if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({ uni.uploadFile({
url: this.uploadUrl, // url: this.uploadUrl, //
@ -355,11 +375,11 @@
} }
}, },
fail: err => { fail: err => {
// //
// uni.showModal({ // uni.showModal({
// content: JSON.stringify(err) // content: JSON.stringify(err)
// }); // });
console.log(err) console.log(err)
} }
}); });
}, },
@ -413,32 +433,34 @@
} }
} }
} }
.videoHover {
width: 180rpx; .videoHover {
height: 180rpx; width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view { .iconfont {
width: 50rpx; color: #ffffff;
height: 50rpx; font-size: 21rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
} }
} }
}
.photo { .photo {
border: 1px solid #dddddd; border: 1px solid #dddddd;
opacity: 1; opacity: 1;
@ -481,10 +503,12 @@
height: 150rpx; height: 150rpx;
} }
} }
.preview_video{
position: absolute; .preview_video {
position: absolute;
}
}
.container_input { .container_input {
background: #fff; background: #fff;
padding: 0 20rpx; padding: 0 20rpx;
@ -603,6 +627,7 @@
.marginTop_none { .marginTop_none {
margin-top: 0; margin-top: 0;
} }
.video-count { .video-count {
position: fixed; position: fixed;
width: 600rpx; width: 600rpx;
@ -621,6 +646,7 @@
height: 500rpx; height: 500rpx;
} }
} }
// .writeBg { // .writeBg {
// background: #fff; // background: #fff;
// } // }

View File

@ -14,7 +14,7 @@
<script> <script>
import selectForm from '../components/selectForm.vue'; import selectForm from '../components/selectForm.vue';
import { navigateTo, navigateBack, serialize, setStorage, getStorage} from '../../../libs/uniApi.js'; import { navigateTo, navigateBack, serialize, setStorage, getStorage } from '../../../libs/uniApi.js';
// attrValue // attrValue
export default { export default {
components:{ components:{

View File

@ -7,10 +7,8 @@
<view class="store_bg"> <view class="store_bg">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<!-- <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFit"></u--image> -->
<u--image :showLoading="true" :src="images[0].img" width="360px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[0].img" width="360px" height="210.53rpx" radius="4px"
@click="delImg(2)"></u--image> @click="delImg(0)"></u--image>
</block> </block>
<view v-else class="upload" @click="seleckImage(0)"> <view v-else class="upload" @click="seleckImage(0)">
<view class="iconfont icon-tupian1"></view> <view class="iconfont icon-tupian1"></view>
@ -135,7 +133,7 @@
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话"> <input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view> </view>
<view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" > <!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch> <u-switch v-model="credit_buy" @change="change"></u-switch>
</view> </view>
@ -149,7 +147,7 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %"> <input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view> </view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell"> <!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb"> <view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text> <text class="sub_title">是否开启商户</text>

View File

@ -47,13 +47,13 @@
<swiper-item :class="{ active: 1 == swiperCur }"> <swiper-item :class="{ active: 1 == swiperCur }">
<view class="slide-navigator"> <view class="slide-navigator">
<!-- 隐藏暂时不需要 --> <!-- 隐藏暂时不需要 -->
<navigator class="item" <!-- <navigator class="item"
:url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'> hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_freight.png"> <image mode='widthFix' class="image" src="../static/images/product_freight.png">
</image> </image>
<text class="text">运费模板</text> <text class="text">运费模板</text>
</navigator> </navigator> -->
<navigator class="item" <navigator class="item"
:url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`" :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
hover-class='none'> hover-class='none'>
@ -61,12 +61,12 @@
src="../static/images/product_specification.png"></image> src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text> <text class="text">规格模板</text>
</navigator> </navigator>
<navigator class="item" <!-- <navigator class="item"
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`" :url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`"
hover-class='none'> hover-class='none'>
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image> <image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">商品导入</text> <text class="text">商品导入</text>
</navigator> </navigator> -->
</view> </view>
</swiper-item> </swiper-item>
</block> </block>
@ -125,9 +125,9 @@
</view> </view>
<view class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="" class="bnt" @click="Fonline(item)" style="width:150rpx"> <!-- <view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
线上入库 线上入库
</view> </view> -->
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx"> <view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
线下入库 线下入库
</view> </view>
@ -264,7 +264,7 @@
}, },
onReachBottom() { onReachBottom() {
// console.log(this.status, '222222222') // console.log(this.status, '222222222')
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getList(this.mer_id, false); this.getList(this.mer_id, false);
@ -282,7 +282,6 @@
value: '2', value: '2',
text: '预览' text: '预览'
}, },
] ]
} else { } else {
this.options = [{ this.options = [{
@ -302,6 +301,9 @@
text: '删除' text: '删除'
}) })
} }
this.ll++ this.ll++
// console.log(this.ll) // console.log(this.ll)
if (this.ll % 2 == 0) { if (this.ll % 2 == 0) {

View File

@ -1077,8 +1077,7 @@
// this.tabs = this.tabs2 // this.tabs = this.tabs2
// this.service_open = false // this.service_open = false
// } // }
if (res.data.business_status == 2) {
if (this.business_status == 1) {
this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3 this.isLihaiYun === 'Lihai' ? this.tabs = this.tabs4 : this.tabs = this.tabs3
} else { } else {
this.tabs = this.tabs5 this.tabs = this.tabs5

View File

@ -273,6 +273,9 @@
}) })
}, },
onShow() {
this.list(true);
},
onReachBottom() { onReachBottom() {
if (this.productList.length > 0) { if (this.productList.length > 0) {
setTimeout(() => { setTimeout(() => {
@ -282,7 +285,6 @@
this.list() this.list()
} }
}, },
beforeDestroy() { beforeDestroy() {
// //

View File

@ -4,12 +4,10 @@ import {
} from "../../api/user.js"; } from "../../api/user.js";
import { import {
LOGIN_STATUS, LOGIN_STATUS,
UID UID,
} from '../../config/cache';
import Cache from '../../utils/cache';
import {
USER_INFO USER_INFO
} from '../../config/cache'; } from '../../config/cache';
import Cache from '../../utils/cache';
// #ifdef APP-PLUS // #ifdef APP-PLUS
import Updater from '@/uni_modules/guyue-updater/index'; import Updater from '@/uni_modules/guyue-updater/index';
// #endif // #endif
@ -18,7 +16,7 @@ const state = {
location: Cache.get('LOCATION_DATA', true) || {}, location: Cache.get('LOCATION_DATA', true) || {},
token: Cache.get(LOGIN_STATUS) || null, token: Cache.get(LOGIN_STATUS) || null,
backgroundColor: "#fff", backgroundColor: "#fff",
userInfo: null, userInfo: Cache.get(USER_INFO) || null,
uid: Cache.get(UID) || null, uid: Cache.get(UID) || null,
globalData: uni.getStorageSync('GLOBAL_DATA') || {}, globalData: uni.getStorageSync('GLOBAL_DATA') || {},
homeActive: false, homeActive: false,
@ -39,6 +37,10 @@ const mutations = {
Cache.set(LOGIN_STATUS, opt.token, opt.time); Cache.set(LOGIN_STATUS, opt.token, opt.time);
uni.removeStorageSync('auth_token'); uni.removeStorageSync('auth_token');
}, },
SET_USERINFO(state, opt) {
state.userInfo = opt;
Cache.set(USER_INFO, opt);
},
SETUID(state, val) { SETUID(state, val) {
state.uid = val; state.uid = val;
Cache.set(UID, val); Cache.set(UID, val);
@ -103,62 +105,6 @@ const actions = {
}).catch(() => { }).catch(() => {
}); });
},
async INIT_CONFIG({
state,
commit
}, data = false) {
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
if (os.osName == 'ios') {
apptype = 2
} else {
apptype = 1
}
Appversion({
version: os.appWgtVersion,
type: apptype,
phone_brand:os.brand
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({
// title: '检查更新中'
// })
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
brand:res.data.appInfo.phone_brand,
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version,res.data.appInfo);
} catch (e) {
console.log(e);
}
// uni.hideLoading();
}
}
}).catch((err) => {
// console.log(err)
})
// #endif
} }
}; };