[...]
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
./unpackage
|
||||
@@ -55,11 +55,19 @@ const employeesPut = (id, data) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 员工管理工具 手太欠
|
||||
const employeesTool = () => {
|
||||
return request({
|
||||
url: 'companies/employees/permission'
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
employees,
|
||||
employeesConfig,
|
||||
addEmployees,
|
||||
employeesInfo,
|
||||
employeesDelete,
|
||||
employeesPut
|
||||
employeesPut,
|
||||
employeesTool
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ const managesGoodsBurn = data => {
|
||||
})
|
||||
}
|
||||
|
||||
// 商品管理-商品上架
|
||||
// 商品管理-商品上架 ********已废弃
|
||||
const managesGoodsOnsale = id => {
|
||||
return request({
|
||||
url: 'manages/goods/'+id+'/onsale',
|
||||
@@ -63,7 +63,7 @@ const managesGoodsOnsale = id => {
|
||||
})
|
||||
}
|
||||
|
||||
// 商品管理-商品下架
|
||||
// 商品管理-商品下架 ********已废弃
|
||||
const managesGoodsOffsale = id => {
|
||||
return request({
|
||||
url: 'manages/goods/'+id+'/offsale',
|
||||
@@ -71,7 +71,7 @@ const managesGoodsOffsale = id => {
|
||||
})
|
||||
}
|
||||
|
||||
// 发布商品前置 manages/goods/create
|
||||
// 发布商品前置
|
||||
const managesGoodsCreateBefore = () => {
|
||||
return request({
|
||||
url: 'manages/goods/create'
|
||||
@@ -102,6 +102,59 @@ const managesCreate = (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 商品认证
|
||||
const managesGoodsAuth = (id, data) => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id + '/extends',
|
||||
method:'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 商品删除
|
||||
const managesGoodsDelete = id => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id,
|
||||
method:'DELETE'
|
||||
})
|
||||
}
|
||||
|
||||
// 产品信息
|
||||
const managesGoodsEdit = id => {
|
||||
return request({
|
||||
url: 'manages/goods/' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 区块链证书
|
||||
const managesChain = (id) => {
|
||||
return request({
|
||||
url: 'mall/goods/'+ id + '/chain'
|
||||
})
|
||||
}
|
||||
|
||||
// 商品认证
|
||||
const managesAttestation = (id) => {
|
||||
return request({
|
||||
url: 'mall/goods/'+ id +'/message'
|
||||
})
|
||||
}
|
||||
|
||||
// 商品溯源
|
||||
const managesTracedTo = (id) => {
|
||||
return request({
|
||||
url: 'mall/goods/'+ id +'/trace'
|
||||
})
|
||||
}
|
||||
|
||||
// 领取优惠券
|
||||
const managesCoupons = (id) => {
|
||||
return request({
|
||||
url: 'coupons/'+ id +'/grant',
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
mall,
|
||||
list,
|
||||
@@ -114,5 +167,12 @@ export {
|
||||
managesGoodsCreateBefore,
|
||||
managesGoodsCreate,
|
||||
managesCategory,
|
||||
managesCreate
|
||||
managesGoodsAuth,
|
||||
managesGoodsDelete,
|
||||
managesGoodsEdit,
|
||||
managesCreate,
|
||||
managesChain,
|
||||
managesAttestation,
|
||||
managesTracedTo,
|
||||
managesCoupons
|
||||
}
|
||||
|
||||
@@ -1,25 +1,61 @@
|
||||
<template>
|
||||
<view class="staff">
|
||||
员工啦
|
||||
<!-- 员工权限工具 -->
|
||||
<!-- <view class="tool-flex store">
|
||||
<view class="store-item" @click="$Router.push({name: 'Verification'})">
|
||||
<view class="tool-flex store">
|
||||
<!-- manage-scan -->
|
||||
<view class="store-item" @click="$Router.push({name: 'Verification'})" v-if="toolList.manageScan">
|
||||
<image class="icon" src="@/static/icons/tool_icon_00.png" mode="aspectFill"></image>
|
||||
<view class="title">扫码验证</view>
|
||||
<view class="title">扫码核销</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="store-item" @click="$Router.push({name: 'GoodsMag'})">
|
||||
|
||||
<!-- manage-goods -->
|
||||
<view class="store-item" @click="$Router.push({name: 'GoodsMag'})" v-if="toolList.manageGoods">
|
||||
<image class="icon" src="@/static/icons/tool_icon_01.png" mode="aspectFill"></image>
|
||||
<view class="title">商品权证</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="store-item" @click="$Router.push({name: 'CouponsMag'})">
|
||||
|
||||
<!-- manage-employee -->
|
||||
<view class="store-item" @click="$Router.push({name: 'Employees'})" v-if="toolList.manageEmployee">
|
||||
<image class="icon" src="@/static/icons/tool_icon_08.png" mode="aspectFill"></image>
|
||||
<view class="title">员工管理</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<!-- order-shipment -->
|
||||
<view class="store-item" @click="$Router.push({name: ''})" v-if="toolList.orderShipment">
|
||||
<image class="icon" src="@/static/icons/tool_icon_04.png" mode="aspectFill"></image>
|
||||
<view class="title">发货单管理</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<!-- order-refund -->
|
||||
<view class="store-item" @click="$Router.push({name: ''})" v-if="toolList.orderRefund">
|
||||
<image class="icon" src="@/static/icons/tool_icon_07.png" mode="aspectFill"></image>
|
||||
<view class="title">退换货管理</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<!-- manageStore -->
|
||||
<view class="store-item" @click="$Router.push({name: 'shopLists'})" v-if="toolList.manageStore">
|
||||
<image class="icon" src="@/static/icons/tool_icon_07.png" mode="aspectFill"></image>
|
||||
<view class="title">部门/门店</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<!-- manage-coupons -->
|
||||
<view class="store-item" @click="$Router.push({name: 'CouponsMag'})" v-if="toolList.manageCoupons">
|
||||
<image class="icon" src="@/static/icons/tool_icon_02.png" mode="aspectFill"></image>
|
||||
<view class="title">优惠券管理</view>
|
||||
<image class="arrow" src="@/static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
|
||||
<view class="store-item">
|
||||
<image class="icon" src="@/static/icons/tool_icon_06.png" mode="aspectFill"></image>
|
||||
<view class="title">营销推广码</view>
|
||||
</view>
|
||||
<view class="store-item" @click="$Router.push({name: 'Collection'})">
|
||||
<image class="icon" src="@/static/icons/tool_icon_03.png" mode="aspectFill"></image>
|
||||
<view class="title">收款管理</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -27,45 +63,11 @@
|
||||
export default {
|
||||
name:"store-staff",
|
||||
props:{
|
||||
// 店铺统计
|
||||
top: {
|
||||
type: Object,
|
||||
default: ()=> {
|
||||
return {
|
||||
barter_total: 0,
|
||||
trading_day : 0,
|
||||
eb_in : 0,
|
||||
cash_in : 0
|
||||
}
|
||||
}
|
||||
// 员工数据
|
||||
toolList: {},
|
||||
},
|
||||
// 店铺概况
|
||||
middle: {
|
||||
type: Object,
|
||||
default: ()=> {
|
||||
return {
|
||||
visitors : 0,
|
||||
clinch : 0,
|
||||
employees: 0,
|
||||
sale : 0,
|
||||
hold : 0,
|
||||
transfer : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
// 店铺订单
|
||||
order: {
|
||||
type: Object,
|
||||
default: ()=> {
|
||||
return {
|
||||
not_shipped : 0,
|
||||
already_shipped : 0,
|
||||
not_pick : 0,
|
||||
already_pick : 0,
|
||||
after_sale : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
created() {
|
||||
// console.log(this.$props.toolList)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -76,7 +78,7 @@
|
||||
.statistical{
|
||||
display: flex;
|
||||
background: $text-price;
|
||||
padding: $padding ($padding/2) $padding*5;
|
||||
padding: $padding ($padding/2) $padding*2;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.item{
|
||||
@@ -95,15 +97,15 @@
|
||||
}
|
||||
// 店铺概况
|
||||
.general{
|
||||
margin: -$margin*4 $margin 0 $margin;
|
||||
margin: -$margin*2 $margin 0 $margin;
|
||||
.general-box{
|
||||
background-color: white;
|
||||
border-radius: $radius/2;
|
||||
display: flex;
|
||||
padding: $padding $padding/2;
|
||||
padding: $padding - 20 $padding/2;
|
||||
flex-wrap: wrap;
|
||||
.general-item{
|
||||
width: 33.33%;
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
padding: $padding/2;
|
||||
box-sizing: border-box;
|
||||
@@ -122,26 +124,33 @@
|
||||
}
|
||||
// 店铺工具
|
||||
.tool-flex{
|
||||
margin: $margin*2 $margin $margin;
|
||||
.store-item{
|
||||
background: white;
|
||||
border-radius: $radius/2;
|
||||
padding: $padding/2;
|
||||
margin: $margin;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.store-item{
|
||||
padding: $padding/2;
|
||||
text-align: center;
|
||||
width: 25%;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: $margin;
|
||||
display: flex;
|
||||
position: relative;
|
||||
.icon{
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
margin-right: $margin - 15;
|
||||
vertical-align: top;
|
||||
}
|
||||
.title{
|
||||
font-size: $title-size-sm;
|
||||
line-height: 58rpx;
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
padding-top: $padding/3;
|
||||
}
|
||||
.arrow {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
filter: brightness(.9);
|
||||
position: absolute;
|
||||
right: $padding - 20;
|
||||
top: $padding - 6;
|
||||
}
|
||||
}
|
||||
.order-item{
|
||||
|
||||
@@ -416,6 +416,13 @@
|
||||
"navigationBarTitleText": "创建门店/部门",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/goods/goodsAuth",
|
||||
"name": "goodsAuth",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品认证信息",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- 商品基本信息 -->
|
||||
<view class="form-block">
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">产品标题</label>
|
||||
<label class="form-label">商品标题</label>
|
||||
<input type="text" v-model="name" placeholder="输入商品标题"/>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
@@ -32,7 +32,7 @@
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">规格单位</label>
|
||||
<input type="digit" :value="skus_unit" placeholder="输入规格单位 如:件"/>
|
||||
<input type="text" v-model="skus_unit" placeholder="输入规格单位 如:件"/>
|
||||
</view>
|
||||
<view class="form-upd">
|
||||
<view class="form-title">商品详情(点击预览,长按删除)</view>
|
||||
@@ -72,62 +72,109 @@
|
||||
</view>
|
||||
<!-- 商品详情介绍 -->
|
||||
<view class="form-block">
|
||||
<!-- is_change query 否 0 是否支持易货 -->
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">易货起购数量</label>
|
||||
<input type="number" v-model="skus_number" placeholder="输入易货起购数量"/>
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">支持易货</label>
|
||||
<view class="picker-switch">
|
||||
<switch :checked="isChange" color="#e93340" @change="pickerChange($event, 'isChange')"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-box inputs-flex" v-if="isChange">
|
||||
<label class="form-label">最低易货量</label>
|
||||
<input type="number" v-model="skus_number" placeholder="输入最低易货量"/>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">商品库存</label>
|
||||
<input type="number" v-model="skus_stock" placeholder="输入商品库存"/>
|
||||
<label class="form-label">发行权证数</label>
|
||||
<input type="number" v-model="skus_stock" placeholder="输入商品发行权证数"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 售后服务 -->
|
||||
<view class="form-block">
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">配送方式</label>
|
||||
<picker :range="logisticArr" range-key="text" :value="logisticType" @change="pickerChange($event, 'logisticType')">
|
||||
<view class="picker-text">
|
||||
logistic_type 1.快递,2.自提<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
{{logisticArr[logisticType].text}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-box picker-flex">
|
||||
<view class="form-box picker-flex" v-if="logisticType === 1">
|
||||
<label class="form-label">关联店铺</label>
|
||||
<view class="picker-text">
|
||||
stores 自提必填<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
<view class="picker-text" @click="opnePopup('storePopup')">
|
||||
已关联{{stores.length}}家店铺<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">允许售后</label>
|
||||
<view class="picker-switch">
|
||||
<switch :checked="isPostSale" color="#e93340" @change="pickerChange($event, 'isPostSale')"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">可选服务</label>
|
||||
<view class="picker-text">
|
||||
321321<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
<view class="picker-text" @click="opnePopup('categoryPopup')">
|
||||
已选{{services.length}}项服务<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 售后服务 -->
|
||||
<view class="form-block">
|
||||
<view class="form-block" v-if="type == 2">
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">到期时间</label>
|
||||
<picker mode="date" :value="expiriedAt" @change="pickerChange($event, 'expiriedAt')">
|
||||
<view class="picker-text">
|
||||
321321<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
{{expiriedAt || '选择服务到期时间'}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 可选服务 -->
|
||||
<uni-popup ref="categoryPopup">
|
||||
<view class="category-popup">
|
||||
<view class="header">
|
||||
<view class="title">选择商品服务</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in servicesArr" :key="index" @click="item.check = !item.check">
|
||||
<view class="category-name">{{item.name}}</view>
|
||||
<view class="category-content">{{item.content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory('services', 'categoryPopup')">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 选择店铺 -->
|
||||
<uni-popup ref="storePopup">
|
||||
<view class="category-popup">
|
||||
<view class="header">
|
||||
<view class="title">选择店铺</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in storesArr" :key="index" @click="item.check = !item.check">
|
||||
<view class="category-name">{{item.name}}</view>
|
||||
<view class="category-content">{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<!-- 安全区 -->
|
||||
<view class="ios-bottom"></view>
|
||||
<!-- footer -->
|
||||
<view class="footer">
|
||||
<button class="footer-btn" type="default">发布</button>
|
||||
<button class="footer-btn" type="default" @click="submitAdd">{{type == 2 ? '发布': '发布并认证'}}</button>
|
||||
<view class="ios-bottom"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsCreate, managesCreate } from '@/apis/interfaces/goods'
|
||||
import { managesGoodsCreate, managesCreate, managesGoodsEdit } from '@/apis/interfaces/goods'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
@@ -143,23 +190,51 @@
|
||||
skus_number : 1, // 易货起购数量
|
||||
skus_unit : '件', // 规格文字
|
||||
skus_charge : '0.00',// 分销佣金
|
||||
skus_stock : 0, // 库存
|
||||
skus_stock : '', // 库存
|
||||
isChange : false, // 是否支持易货
|
||||
logisticType: 0, // 配送方式
|
||||
stores : [], // 关联店铺
|
||||
expiriedAt : '', // 活动到期时间
|
||||
logisticType: 0, // 配送方式
|
||||
logisticArr : [
|
||||
{text: '快递', type: 1},
|
||||
{text: '自提', type: 2}
|
||||
],
|
||||
// 配置信息
|
||||
storesArr : [], // 可选店铺
|
||||
tags : [], // 可选商品标签
|
||||
tagsIndex : 0, // 选择标签的下标
|
||||
servicesArr : [], // 可选服务
|
||||
type : 1, // 1为商品,0为服务
|
||||
type : 1, // 1为商品,2为服务
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$Route.query.type === 'edit'){
|
||||
console.log('编辑')
|
||||
managesGoodsEdit(this.$Route.query.id).then(res => {
|
||||
console.log(res)
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
managesCreate({
|
||||
category_cid: 140
|
||||
category_cid: this.$Route.query.cid
|
||||
}).then(res => {
|
||||
res.services = res.services.map(val => {
|
||||
return {
|
||||
check: false,
|
||||
...val
|
||||
}
|
||||
})
|
||||
res.stores = res.stores.map(val => {
|
||||
return {
|
||||
check: false,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.storesArr = res.stores
|
||||
this.tags = res.tags
|
||||
this.servicesArr= res.services
|
||||
@@ -172,6 +247,25 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 选择商品服务
|
||||
opnePopup(key){
|
||||
this.$refs[key].open('bottom')
|
||||
},
|
||||
// 确认选择商品服务
|
||||
affirmCategory(key, popupKey){
|
||||
let keyArr = key == 'services' ? 'servicesArr' : 'storesArr'
|
||||
this[key] = []
|
||||
for(let val of this[keyArr]){
|
||||
if(val.check){
|
||||
this[key].push(val.service_id || val.store_id)
|
||||
}
|
||||
}
|
||||
this.$refs[popupKey].close()
|
||||
},
|
||||
// picker选择
|
||||
pickerChange(e, key){
|
||||
this[key] = e.detail.value
|
||||
},
|
||||
// 图片预览
|
||||
openImg(index, key){
|
||||
let paths = this[key].map(val => {
|
||||
@@ -212,6 +306,55 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发布产品
|
||||
submitAdd(){
|
||||
let pictures = this.pictures.map(val => {return val.path}),
|
||||
content = this.content.map(val => {return val.path})
|
||||
|
||||
let submitData = {
|
||||
name : this.name,
|
||||
cover : this.pictures[0].path,
|
||||
category_id : this.$Route.query.id,
|
||||
category_cid : this.$Route.query.cid,
|
||||
pictures : pictures,
|
||||
content : content,
|
||||
description : this.description,
|
||||
is_post_sale : this.isPostSale ? 0 : 1,
|
||||
services : this.services,
|
||||
skus_cost : this.skus_cost,
|
||||
skus_price : this.skus_price,
|
||||
skus_number : this.skus_number,
|
||||
skus_unit : this.skus_unit,
|
||||
skus_charge : this.skus_charge,
|
||||
skus_stock : this.skus_stock,
|
||||
is_change : this.isChange ? 0 : 1,
|
||||
logistic_type: this.logisticArr[this.logisticType].type,
|
||||
stores : this.stores,
|
||||
expiried_at : this.expiriedAt
|
||||
}
|
||||
let submitFund = managesGoodsCreate(submitData)
|
||||
submitFund.then(res => {
|
||||
if(this.type === 2){
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '商品权证已发布,请耐心等待平台审核',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.back()
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$Router.push({name: 'goodsAuth', params: { id: res , type: 'goodsAdd'}})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -283,6 +426,15 @@
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.picker-switch{
|
||||
line-height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
text-align: right;
|
||||
margin-right: -15rpx;
|
||||
switch{
|
||||
transform:scale(0.7)
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-upd{
|
||||
.form-title{
|
||||
@@ -334,7 +486,7 @@
|
||||
right: 0;
|
||||
padding: 20rpx $padding;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
z-index: 99;
|
||||
z-index: 9;
|
||||
.footer-btn{
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
@@ -349,4 +501,68 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// 可选服务
|
||||
.category-popup{
|
||||
background: #F5F5F5;
|
||||
padding: 0 $padding * 2 $padding * 2 $padding * 2;
|
||||
.header{
|
||||
padding: $padding*2 0;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.subtitle{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.category-flex{
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
.category-flex-item{
|
||||
margin-bottom: $margin;
|
||||
padding: $padding;
|
||||
background: white;
|
||||
border:solid 1rpx white;
|
||||
box-sizing: border-box;
|
||||
.category-name{
|
||||
padding-bottom: $padding/2;
|
||||
font-weight: bold;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
.category-content{
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
@extend .ellipsis;
|
||||
}
|
||||
&.show{
|
||||
color: $text-price;
|
||||
border:solid 1rpx $text-price;
|
||||
}
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -26,14 +26,15 @@
|
||||
},
|
||||
created() {
|
||||
managesCategory().then(res => {
|
||||
console.log(res)
|
||||
this.loding = false
|
||||
this.category = res
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 选择分类
|
||||
onCategory(id){
|
||||
this.$Router.push({name: 'GoodsMagAdd', params: {id}})
|
||||
onCategory(cid){
|
||||
this.$Router.push({name: 'GoodsMagAdd', params: {cid, id: this.category[this.stairIndex].category_id}})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
186
pages/goods/attestation.vue
Normal file
186
pages/goods/attestation.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view class="GoodsAuthentication">
|
||||
<view class="authenticationTop">区块链溯源码:{{info.token}}</view>
|
||||
<!-- 商品认证 商品和服务 -->
|
||||
<view class="authenticationItem">
|
||||
<view class="authenticationItemTitle">商品认证</view>
|
||||
<view class="authenticationItemcontent" v-if="info.goods">
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">{{info.goods.type ===1?'商品名称':'项目名称'}}: </view>
|
||||
<view class="content">{{info.goods.name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
|
||||
<view class="title">生产批次:</view>
|
||||
<view class="content">{{info.goods.batch || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===2" >
|
||||
<view class="title">项目分类:</view>
|
||||
<view class="content">{{info.goods.category || '暂无数据'}}</view>
|
||||
</view>
|
||||
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
|
||||
<view class="title">规格:</view>
|
||||
<view class="content">{{info.goods.skus[0].unit || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">数量:</view>
|
||||
<view class="content">{{info.goods.skus[0].stock || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">售价:</view>
|
||||
<view class="content">{{info.goods.skus[0].price || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
|
||||
<view class="title">生产日期:</view>
|
||||
<view class="content">{{info.goods.producted_at || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">{{info.goods.type ===1?'保质期':'有效期'}}:</view>
|
||||
<view class="content">{{info.goods.expiried_at || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
|
||||
<view class="title">生产厂家:</view>
|
||||
<view class="content">{{info.goods.product_name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="info.goods.type ===1">
|
||||
<view class="title">生产地:</view>
|
||||
<view class="content">{{info.goods.product_address || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">供应商:</view>
|
||||
<view class="content">{{info.goods.skus[0].price || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">经营许可证:</view>
|
||||
<view class="content">{{info.goods.lisence || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">实物照片:</view>
|
||||
<image class="img" v-if="info.goods.cover" :src="info.goods.cover" @click="priveImg(info.goods.cover)" mode="aspectFill" />
|
||||
<view class="content" v-else>暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 企业认证 (商品和服务通用) -->
|
||||
<view class="authenticationItem">
|
||||
<view class="authenticationItemTitle">企业认证</view>
|
||||
<view class="authenticationItemcontent" v-if="info.certification">
|
||||
<view class="authenticationItemcontentItem" >
|
||||
<view class="title">企业名称:</view>
|
||||
<view class="content">{{info.certification.name || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">企业地址:</view>
|
||||
<view class="content">{{info.certification.address || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">统一信用代码:</view>
|
||||
<view class="content">{{info.certification.certification.code || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">行业:</view>
|
||||
<view class="content">{{info.certification.industry.title || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">经营范围:</view>
|
||||
<view class="content">{{info.certification.range || '暂无数据'}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">联系电话:</view>
|
||||
<u-icon name="phone-fill" v-if='info.certification.contack' @click="call(info.certification.contact)"
|
||||
color="#2979ff" label-color="#2979ff" label-size="26" :label='info.certification.contact' />
|
||||
<view class="content" v-else> 暂无数据 </view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">营业执照:</view>
|
||||
<image class="img" v-if='info.certification.certification.license' :src="info.certification.certification.license" @click="priveImg(info.certification.certification.license)" mode="aspectFill" />
|
||||
<view class="content" v-else>暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗提示喽 -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesAttestation } from '@/apis/interfaces/goods'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
managesAttestation(this.$Route.query.id).then(res=>{
|
||||
console.log(res)
|
||||
this.info = res
|
||||
})
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
.GoodsAuthentication {
|
||||
padding: 30rpx;
|
||||
|
||||
.authenticationTop {
|
||||
width: 100%;
|
||||
padding: 20rpx 50rpx;
|
||||
background-color: #c82626;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
border-radius: 60rpx;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
}
|
||||
// 商品认证
|
||||
.authenticationItem{
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
margin-top: 20rpx;
|
||||
.authenticationItemTitle{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
.authenticationItemcontent{
|
||||
width: 100%;
|
||||
min-height: 500rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
border: solid rgba(200,38,0,.05) 6rpx;
|
||||
box-shadow:2rpx 2rpx 20rpx 0rpx rgba(200,38,0,.051);
|
||||
padding:10rpx 20rpx;
|
||||
.authenticationItemcontentItem{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx 0;
|
||||
font-size: 24rpx;
|
||||
.title{
|
||||
width: 180rpx;
|
||||
}
|
||||
.content{
|
||||
text-overflow: ellipsis;
|
||||
width: calc( 100% - 180rpx);
|
||||
}
|
||||
.img{
|
||||
width: 340rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
117
pages/goods/chain.vue
Normal file
117
pages/goods/chain.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<view class="GoodsChain">
|
||||
<image src="https://e-chain.cnskl.com/storage/imageresource/chain-bg.png" class='chainBg' />
|
||||
<view class="chain-content">
|
||||
<view class="chain-center">
|
||||
<image src="/static/images/service-logi.png" mode="aspectFill" class="logo" />
|
||||
<view class="name">易品新境区块链溯源证书</view>
|
||||
<view class="no">区块链溯源证书:{{info.token}}</view>
|
||||
<view class="content">
|
||||
<view class="con-item">兹证明:</view>
|
||||
<view class="con-item" v-if="info.company">
|
||||
{{info.company.name}},产品符合溯源规范,认证内容如下:特授权其产品在易品新境区块链溯源商城出售!
|
||||
</view>
|
||||
<view class="con-item">交易哈希: {{info.hash}}</view>
|
||||
<view class="con-item">区块链高度: {{info.height}}</view>
|
||||
</view>
|
||||
<view class="date" v-if="info.applied_at">授权时间: {{info.applied_at}}</view>
|
||||
<view class="date">有效期至: {{info.ended_at}}</view>
|
||||
<view class="companyInfo">易品新境区块链有限公司</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹窗提示喽 -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesChain } from '@/apis/interfaces/goods'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
managesChain(this.$Route.query.id).then(res=>{
|
||||
this.info = res
|
||||
})
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
.GoodsChain {
|
||||
background-color:fff;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
.chainBg{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
.chain-content{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
z-index: 2;
|
||||
padding: 18vh 10vw 15vh 10vw ;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
.chain-center{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.logo{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
margin-left: -80rpx;
|
||||
left: 50%;
|
||||
margin-bottom: 20rpx;
|
||||
border: solid rgba($color: #fff, $alpha: .3) 10rpx;
|
||||
}
|
||||
.name{
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.no{
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.content{
|
||||
margin-top: 60rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0 20rpx;
|
||||
.con-item{
|
||||
margin-bottom: 30rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.date{
|
||||
text-align: right;
|
||||
margin-bottom: 10rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
.companyInfo{
|
||||
text-align: right;
|
||||
margin-bottom: 40rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -45,15 +45,15 @@
|
||||
<view class="openbtn" @click="onOpenWechat">进店<image class="openbtn-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image></view>
|
||||
</view>
|
||||
<view class="tooSee">
|
||||
<view class="tooSee-label">
|
||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodsChain', params: {id: goodsObj.goods_id}})">
|
||||
区块链证书
|
||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="tooSee-label">
|
||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodsAttestation', params: {id: goodsObj.goods_id}})">
|
||||
商品认证
|
||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="tooSee-label">
|
||||
<view class="tooSee-label" @click="$Router.push({name: 'GoodstracedTo', params: {id: goodsObj.goods_id}})">
|
||||
商品溯源
|
||||
<image class="tooSee-label-img" src="../../static/icons/equity_arrow_right.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
@@ -129,7 +129,7 @@
|
||||
{{item.time.interval}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupons-right">
|
||||
<view class="coupons-right" @click="drawCoupons(item.coupon_id)">
|
||||
领取
|
||||
</view>
|
||||
</view>
|
||||
@@ -166,7 +166,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { goods } from '@/apis/interfaces/goods'
|
||||
import { goods, managesCoupons } from '@/apis/interfaces/goods'
|
||||
import userAuth from '@/public/userAuth'
|
||||
export default {
|
||||
data() {
|
||||
@@ -181,7 +181,6 @@
|
||||
},
|
||||
created() {
|
||||
goods(this.$Route.query.id || 16).then(res=>{
|
||||
console.log(res.coupons)
|
||||
this.loding = false
|
||||
this.goodsObj = res
|
||||
this.identity = res.identity.id || ''
|
||||
@@ -235,6 +234,14 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 领取优惠券
|
||||
drawCoupons(id){
|
||||
console.log(id)
|
||||
managesCoupons(id).then(res=>{
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
|
||||
// 选择优惠券-显示
|
||||
couponsOpne(){
|
||||
this.$refs.couponsPopup.open('bottom')
|
||||
@@ -305,8 +312,8 @@
|
||||
font-size: 24rpx;
|
||||
border-radius: 50rpx;
|
||||
padding: 0 10rpx;
|
||||
height: 38rpx;
|
||||
line-height: 38rpx;
|
||||
height: 34rpx;
|
||||
line-height: 36rpx;
|
||||
margin: 6rpx 10rpx 0 0;
|
||||
}
|
||||
}
|
||||
@@ -342,33 +349,36 @@
|
||||
background-color: #fef2f2;
|
||||
color: #e1293f;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #e7e2df;
|
||||
padding: $padding - 10;
|
||||
border: 1rpx solid #ffe5e5;
|
||||
padding: $padding - 15;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-bottom: $margin - 10;
|
||||
.coupon-list {
|
||||
font-size: 24rpx;
|
||||
font-size: 22rpx;
|
||||
.coupon-label {
|
||||
display: inline-block;
|
||||
border: 2rpx solid #e1293f;
|
||||
border: 1rpx solid #e998a1;
|
||||
border-radius: 50rpx;
|
||||
padding: 4rpx 15rpx;
|
||||
padding: 0 15rpx;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
margin-right: $margin - 10;
|
||||
}
|
||||
}
|
||||
.coupon-btn {
|
||||
position: absolute;
|
||||
right: $padding - 10;
|
||||
top: $padding - 10;
|
||||
font-size: 28rpx;
|
||||
right: $padding - 20;
|
||||
top: 0;
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
font-weight: 700;
|
||||
.coupon-btn-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-top: 6rpx;
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin: 20rpx 0 0 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -402,7 +412,7 @@
|
||||
background: #F8F8F8;
|
||||
border-radius: $radius/2;
|
||||
padding: $padding;
|
||||
min-height: 160rpx;
|
||||
min-height: 220rpx;
|
||||
.logo{
|
||||
position: absolute;
|
||||
left: $margin;
|
||||
@@ -697,4 +707,9 @@
|
||||
line-height: 44rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.serve-cont {
|
||||
height: 40vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
|
||||
357
pages/goods/goodsAuth.vue
Normal file
357
pages/goods/goodsAuth.vue
Normal file
@@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="form-block">
|
||||
<view class="form-upd">
|
||||
<view class="form-title">产品实物图片<text>(点击预览,长按删除)</text></view>
|
||||
<view class="form-imgs">
|
||||
<view
|
||||
class="item"
|
||||
v-if="extendCover.length > 0"
|
||||
@click="openImg"
|
||||
@longpress="extendCover = []"
|
||||
>
|
||||
<image class="item-cover" :src="extendCover[0].showpath" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="item item-add" v-else @click="updCover">
|
||||
<image class="item-cover" src="@/static/icons/add-icon.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品基本信息 -->
|
||||
<view class="form-block">
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">生产日期</label>
|
||||
<picker mode="date" :value="productedAt" @change="pickerChange($event, 'productedAt')">
|
||||
<view class="picker-text">
|
||||
{{productedAt || '选择商品生产日期'}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-box picker-flex">
|
||||
<label class="form-label">过期时间</label>
|
||||
<picker mode="date" :value="expiriedAt" @change="pickerChange($event, 'expiriedAt')">
|
||||
<view class="picker-text">
|
||||
{{expiriedAt || '选择商品过期时间'}}
|
||||
<uni-icons class="picker-icon" type="arrowright" color="#999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产商名称</label>
|
||||
<input type="text" v-model="productName" placeholder="输入商品生产商名称"/>
|
||||
</view>
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产许可证号</label>
|
||||
<input type="text" v-model="lisence" placeholder="输入商品生产许可证号"/>
|
||||
</view>
|
||||
|
||||
<view class="form-box inputs-flex">
|
||||
<label class="form-label">生产商地址</label>
|
||||
<input type="text" v-model="productAddress" placeholder="输入商品生产商地址"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 安全区 -->
|
||||
<view class="ios-bottom"></view>
|
||||
<!-- footer -->
|
||||
<view class="footer">
|
||||
<button class="footer-btn" type="default" @click="submitAdd">提交认证审核</button>
|
||||
<view class="ios-bottom"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsAuth } from '@/apis/interfaces/goods'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productedAt : '', // 生产日期
|
||||
expiriedAt : '', // 过期时间
|
||||
lisence : '', // 生产许可证号
|
||||
productName : '', // 生产商名称
|
||||
productAddress : '', // 生产商地址
|
||||
extendCover : [] // 实物图片
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// picker选择
|
||||
pickerChange(e, key){
|
||||
this[key] = e.detail.value
|
||||
},
|
||||
// 图片预览
|
||||
openImg(){
|
||||
let paths = this.extendCover.map(val => {
|
||||
return val.showpath
|
||||
})
|
||||
uni.previewImage({
|
||||
urls : paths,
|
||||
current : 0,
|
||||
indicator: 'number'
|
||||
})
|
||||
},
|
||||
// 上传图片
|
||||
updCover(){
|
||||
uni.chooseImage({
|
||||
count : 1,
|
||||
success : res => {
|
||||
uploads([{
|
||||
uri : res.tempFilePaths[0]
|
||||
}]).then(updRes => {
|
||||
this.extendCover.push({
|
||||
path : updRes.path[0],
|
||||
showpath: updRes.url[0]
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 发布产品
|
||||
submitAdd(){
|
||||
let submitData = {
|
||||
producted_at : this.productedAt,
|
||||
expiried_at : this.expiriedAt,
|
||||
lisence : this.lisence,
|
||||
product_name : this.productName,
|
||||
product_address : this.productAddress,
|
||||
extend_cover : this.extendCover[0].path
|
||||
}
|
||||
let submitFund = managesGoodsAuth(this.$Route.query.id, submitData)
|
||||
submitFund.then(res => {
|
||||
uni.showModal({
|
||||
title : '提示',
|
||||
content : '商品权证认证信息已提交,请耐心等待平台审核',
|
||||
showCancel : false,
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.back(this.$Route.query.type == 'goodsAdd' ? 2 : 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
padding-bottom: 150rpx;
|
||||
}
|
||||
// 表单
|
||||
.form-block{
|
||||
background: white;
|
||||
margin-top: $margin - 10;
|
||||
.form-box{
|
||||
position: relative;
|
||||
padding-left: 240rpx;
|
||||
padding-right: $padding;
|
||||
font-size: $title-size-lg;
|
||||
min-height: 80rpx;
|
||||
&::after{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: $margin;
|
||||
right: 0;
|
||||
height: 1rpx;
|
||||
content: " ";
|
||||
background: $border-color;
|
||||
}
|
||||
&:last-child::after{
|
||||
display: none;
|
||||
}
|
||||
.form-label{
|
||||
position: absolute;
|
||||
left: $margin;
|
||||
line-height: 80rpx;
|
||||
top: 0;
|
||||
width: calc(240rpx - #{$margin});
|
||||
}
|
||||
}
|
||||
.inputs-flex{
|
||||
input{
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
.input-unit{
|
||||
padding-right: 200rpx;
|
||||
.units{
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
line-height: 80rpx;
|
||||
height: 80rpx;
|
||||
width: 200rpx;
|
||||
padding-right: $padding;
|
||||
text-align: right;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.picker-flex{
|
||||
.picker-text{
|
||||
position: relative;
|
||||
line-height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
padding-right: 80rpx;
|
||||
@extend .nowrap;
|
||||
.picker-icon{
|
||||
right: 0;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.picker-switch{
|
||||
line-height: 80rpx;
|
||||
min-height: 80rpx;
|
||||
text-align: right;
|
||||
margin-right: -15rpx;
|
||||
switch{
|
||||
transform:scale(0.7)
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-upd{
|
||||
.form-title{
|
||||
font-size: $title-size-lg;
|
||||
line-height: 80rpx;
|
||||
padding: 0 $padding;
|
||||
text{
|
||||
font-size: 80%;
|
||||
color: $text-gray;
|
||||
}
|
||||
}
|
||||
.form-imgs{
|
||||
margin-top: -($margin/3);
|
||||
padding: 0 20rpx 20rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item{
|
||||
width: calc(20% - 14rpx);
|
||||
padding-top: calc(20% - 14rpx);
|
||||
margin: 7rpx;
|
||||
position: relative;
|
||||
.item-cover{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.item-add{
|
||||
border: dashed 2rpx $border-color;
|
||||
box-sizing: border-box;
|
||||
.item-cover{
|
||||
top: calc(15% - 2rpx);
|
||||
left: calc(15% - 2rpx);
|
||||
width: 70%;
|
||||
height: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 发布
|
||||
.footer{
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 20rpx $padding;
|
||||
box-shadow: 0 0 4rpx 4rpx rgba($color: #000000, $alpha: .02);
|
||||
z-index: 9;
|
||||
.footer-btn{
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: $text-price;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 可选服务
|
||||
.category-popup{
|
||||
background: #F5F5F5;
|
||||
padding: 0 $padding * 2 $padding * 2 $padding * 2;
|
||||
.header{
|
||||
padding: $padding*2 0;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
.subtitle{
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.category-flex{
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
.category-flex-item{
|
||||
margin-bottom: $margin;
|
||||
padding: $padding;
|
||||
background: white;
|
||||
border:solid 1rpx white;
|
||||
box-sizing: border-box;
|
||||
.category-name{
|
||||
padding-bottom: $padding/2;
|
||||
font-weight: bold;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
.category-content{
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
@extend .ellipsis;
|
||||
}
|
||||
&.show{
|
||||
color: $text-price;
|
||||
border:solid 1rpx $text-price;
|
||||
}
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btns{
|
||||
padding-top: $padding * 2;
|
||||
button{
|
||||
background: $text-price;
|
||||
border-radius: 0;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
&::after{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,10 +2,10 @@
|
||||
<view class="content">
|
||||
<!-- 分类 -->
|
||||
<view class="tabs">
|
||||
<view class="item" :class="{'show': status == '1'}" @click="onTabs('1')">已上架</view>
|
||||
<view class="item" :class="{'show': status == '3'}" @click="onTabs('3')">已下架</view>
|
||||
<view class="item" :class="{'show': status == '0'}" @click="onTabs('0')">审核中</view>
|
||||
<view class="item" :class="{'show': status == '2'}" @click="onTabs('2')">已驳回</view>
|
||||
<view class="item" :class="{'show': status == '0'}" @click="onTabs('0')">已发布</view>
|
||||
<view class="item" :class="{'show': status == '1'}" @click="onTabs('1')">待认证</view>
|
||||
<view class="item" :class="{'show': status == '2'}" @click="onTabs('2')">审核中</view>
|
||||
<view class="item" :class="{'show': status == '3'}" @click="onTabs('3')">已驳回</view>
|
||||
</view>
|
||||
<!-- 优选商品 -->
|
||||
<goodsList :list="goods" priceType="CNY" :status='status' toast="暂无产品权证">
|
||||
@@ -14,16 +14,19 @@
|
||||
</template>
|
||||
<template v-slot:footer="goods">
|
||||
<view class="footer-btns">
|
||||
<block v-if="status == '1'">
|
||||
<block v-if="status == '0'">
|
||||
<button class="button-item" size="mini" @click="openLay(goods.value, 'goodsBurn')">燃烧</button>
|
||||
<button class="button-item" size="mini" @click="openLay(goods.value, 'goodsMint')">增发</button>
|
||||
<button class="button-item" size="mini" @click="goodsOffsale(goods.value.goods_id)">下架</button>
|
||||
</block>
|
||||
<block v-if="status == '1'">
|
||||
<button class="button-item" size="mini" @click="goodsAuth(goods.value.goods_id)">认证</button>
|
||||
<button class="button-item" size="mini" @click="goodsRemove(goods.value.goods_id)">删除</button>
|
||||
</block>
|
||||
<block v-if="status == '2'">
|
||||
<button class="button-item" size="mini" @click="goodsRemove(goods.value.goods_id)">删除</button>
|
||||
</block>
|
||||
<block v-if="status == '3'">
|
||||
<button class="button-item" size="mini" @click="goodsOnsale(goods.value.goods_id)">上架</button>
|
||||
</block>
|
||||
<block v-if="status == '0' || status == '2'">
|
||||
<button class="button-item" size="mini">修改</button>
|
||||
<button class="button-item" size="mini" @click="goodsPut(goods.value.goods_id, goods.value.reason)">驳回原因</button>
|
||||
<button class="button-item" size="mini" @click="goodsRemove(goods.value.goods_id)">删除</button>
|
||||
</block>
|
||||
</view>
|
||||
@@ -48,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesGoodsIndex, managesGoodsOffsale, managesGoodsOnsale, managesGoodsBurn, managesGoodsMint, managesGoodsCreateBefore } from '@/apis/interfaces/goods'
|
||||
import { managesGoodsIndex, managesGoodsDelete, managesGoodsBurn, managesGoodsMint, managesGoodsCreateBefore } from '@/apis/interfaces/goods'
|
||||
import goodsList from '@/components/goods-list/goods-list'
|
||||
export default {
|
||||
components: {
|
||||
@@ -56,7 +59,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status : 1,
|
||||
status : 0,
|
||||
goods : [],
|
||||
pages : {},
|
||||
itemGoods : {},
|
||||
@@ -71,6 +74,7 @@
|
||||
// tabs
|
||||
onTabs(value){
|
||||
if(value == this.status) return
|
||||
this.goods = []
|
||||
this.status = value
|
||||
this.getList()
|
||||
},
|
||||
@@ -79,23 +83,29 @@
|
||||
managesGoodsIndex({
|
||||
status: this.status
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
})
|
||||
},
|
||||
// 下架
|
||||
goodsOffsale(id){
|
||||
let index = this.goods.findIndex(val => val.goods_id == id)
|
||||
managesGoodsOffsale(id).then(res => {
|
||||
this.goods.splice(index,1)
|
||||
if(this.goods.length === 0) this.getList()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
// 修改产品
|
||||
goodsPut(id, text){
|
||||
uni.showModal({
|
||||
title : '驳回原因',
|
||||
content : text,
|
||||
confirmText : '编辑',
|
||||
cancelText : '确定',
|
||||
success : res => {
|
||||
if(res.confirm){
|
||||
this.$Router.push({name: 'GoodsMagAdd', params: {type: 'edit', id}})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 商品认证
|
||||
goodsAuth(id){
|
||||
this.$Router.push({name: 'goodsAuth', params: {id, type: 'magList'}})
|
||||
},
|
||||
// 燃烧,增发
|
||||
openLay(item, type){
|
||||
this.itemGoods = item
|
||||
@@ -142,12 +152,16 @@
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 上架
|
||||
goodsOnsale(id){
|
||||
// 移出删除商品
|
||||
goodsRemove(id){
|
||||
let index = this.goods.findIndex(val => val.goods_id == id)
|
||||
managesGoodsOnsale(id).then(res => {
|
||||
managesGoodsDelete(id).then(res => {
|
||||
this.goods.splice(index,1)
|
||||
if(this.goods.length === 0) this.getList()
|
||||
uni.showToast({
|
||||
title: '商品权证已删除',
|
||||
icon : 'none'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -157,7 +171,7 @@
|
||||
}
|
||||
},
|
||||
onNavigationBarButtonTap() {
|
||||
this.$Router.push({name: 'GoodsMagAdd'})
|
||||
this.$Router.push({name: 'addClassify'})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
199
pages/goods/tracedTo.vue
Normal file
199
pages/goods/tracedTo.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<view class="GoodsAuthentication">
|
||||
<view class="authenticationTop" v-if='list.length>0'>区块链溯源码:{{info.token}}</view>
|
||||
<!-- 进度条 -->
|
||||
<view v-if='list.length>0' class='timeAxis'>
|
||||
<view class="box-top" v-for="(item,index) in list" :key="index">
|
||||
<view class="left-box-top"><span>商品交易</span>{{item.blockTime}}</view> <!-- 左边 -->
|
||||
<view class="line" :class="{active:true,none:index==(list.length-1)}"><!-- 中线 -->
|
||||
<view class="dot" :class="{active:true}"></view><!-- 圆点 -->
|
||||
</view>
|
||||
|
||||
<!-- 右边 -->
|
||||
<view class="right-box-top">
|
||||
<view class="authenticationItem">
|
||||
<view class="authenticationItemcontent">
|
||||
<view class="authenticationItemcontentItem" v-if="item.goods">
|
||||
<view class="title">名称:</view>
|
||||
<view class="content">{{item.goods.name}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem" v-if="item.goods">
|
||||
<view class="title">规格:</view>
|
||||
<view class="content">{{item.goods.skus[0].unit}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">购买数量:</view>
|
||||
<view class="content">{{item.amount}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">区块链高度:</view>
|
||||
<view class="content">{{item.height}}</view>
|
||||
</view>
|
||||
<view class="authenticationItemcontentItem">
|
||||
<view class="title">交易哈希:</view>
|
||||
<view class="content">{{item.hash}}</view>
|
||||
</view>
|
||||
<view class="zhushi">注释:{{item.note}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<no-list v-if="list.length === 0" name='no-chain' txt="没有任何数据哦~" />
|
||||
<!-- 弹窗提示喽 -->
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { managesTracedTo } from '@/apis/interfaces/goods'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: '',
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.$Route.query.id)
|
||||
managesTracedTo(this.$Route.query.id).then(res=>{
|
||||
console.log(res)
|
||||
this.list = res.list
|
||||
this.info = res
|
||||
})
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
||||
.GoodsAuthentication {
|
||||
padding: 30rpx;
|
||||
.authenticationTop {
|
||||
width: 100%;
|
||||
padding: 20rpx 50rpx;
|
||||
background-color: #c82626;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
border-radius: 60rpx;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
// 商品认证
|
||||
.authenticationItem {
|
||||
width: 100%;
|
||||
min-height: 300rpx;
|
||||
.authenticationItemTitle {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.timeAxis {
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.box-top{
|
||||
width: 100%;
|
||||
min-height: 120rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.left-box-top{
|
||||
width: 124rpx;
|
||||
text-align: center;
|
||||
color: #cacaca;
|
||||
font-size: 22rpx;
|
||||
padding-top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
span{
|
||||
font-size: 28rpx;
|
||||
// font-weight: bold;
|
||||
color:#333;
|
||||
padding-bottom: 10rpx;
|
||||
padding-right: 4rpx;
|
||||
}
|
||||
}
|
||||
.line{
|
||||
width: 2rpx;
|
||||
background-color: rgba(228,231,237,1);
|
||||
margin: 0 20rpx 0 20rpx;
|
||||
padding-top: 0;
|
||||
.dot{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background-color: rgba(228,231,237,1);
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
left: -10rpx;
|
||||
}
|
||||
}
|
||||
.right-box-top{
|
||||
flex: 1;
|
||||
width: calc( 100% - 170rpx);
|
||||
padding: 0 0 20rpx 0;
|
||||
// 商品认证
|
||||
.authenticationItem{
|
||||
width: 100%;
|
||||
.authenticationItemcontent{
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
border: solid rgba(200,38,0,.05) 6rpx;
|
||||
box-shadow:2rpx 2rpx 20rpx 0rpx rgba(200,38,0,.051);
|
||||
padding:10rpx 20rpx;
|
||||
.zhushi{
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
padding: 10rpx 0;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
.authenticationItemcontentItem{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
padding: 12rpx 0;
|
||||
font-size: 26rpx;
|
||||
.title{
|
||||
width: 160rpx;
|
||||
}
|
||||
.content{
|
||||
text-overflow: ellipsis;
|
||||
width: calc( 100% - 180rpx);
|
||||
word-wrap:break-word;
|
||||
}
|
||||
.img{
|
||||
width: 220rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//激活元素
|
||||
.active{
|
||||
background-color: #c82626 !important;
|
||||
}
|
||||
// 隐藏元素
|
||||
.none{
|
||||
background-color: rgba(0,0,0,0) !important;
|
||||
}
|
||||
</style>
|
||||
@@ -145,6 +145,11 @@
|
||||
<!-- 推广海报 -->
|
||||
<view class="poster-text">推广海报</view>
|
||||
<carousel :img-list="imgList" url-key="url" @selected="selectedBanner"/>
|
||||
|
||||
|
||||
<view class="" @click="outLogin">
|
||||
临时退出
|
||||
</view>
|
||||
</block>
|
||||
<!-- 版权信息 -->
|
||||
<view class="copyright" @click="copyright">易品新境 beta 1.0.0</view>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- 老板 -->
|
||||
<boss v-if="!employee" :word-data="workbench"/>
|
||||
<!-- 员工 -->
|
||||
<staff v-if="employee"/>
|
||||
<staff v-if="employee" :tool-list="toolList"/>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 登录提示 -->
|
||||
@@ -60,6 +60,7 @@
|
||||
<script>
|
||||
import { index } from '@/apis/interfaces/store'
|
||||
import { isallow, appliesQuery } from '@/apis/interfaces/company'
|
||||
import { employeesTool } from '@/apis/interfaces/employees'
|
||||
import boss from '@/components/store-boss/store-boss'
|
||||
import staff from '@/components/store-staff/store-staff'
|
||||
import userAuth from '@/public/userAuth'
|
||||
@@ -75,11 +76,20 @@
|
||||
certification: false,
|
||||
employee : false,
|
||||
workbench : {},
|
||||
company : {}
|
||||
company : {},
|
||||
toolList : ''
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.getIndex()
|
||||
// 获取员工管理列表
|
||||
if(this.$store.state.token != ''){
|
||||
if(!this.employee) {
|
||||
employeesTool().then(res=>{
|
||||
this.toolList = res.permission
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 首页数据
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- v-if="!loding" -->
|
||||
<view class="content">
|
||||
<swiper class="vip-container" previous-margin="45rpx" next-margin="45rpx" circular @change="swiperChange">
|
||||
<!-- <swiper class="vip-container" previous-margin="45rpx" next-margin="45rpx" circular @change="swiperChange">
|
||||
<swiper-item class="vip-item">
|
||||
<view>
|
||||
VIP企业会员
|
||||
@@ -17,14 +17,14 @@
|
||||
超级会员
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</swiper> -->
|
||||
|
||||
<!-- 会员类型 -->
|
||||
<!-- <view class="tabs">
|
||||
<view class="tabs">
|
||||
<view class="item" :class="{'show': index === tabsIndex}" v-for="(item, index) in identities" :key="index" @click="onTabs(index)">{{item.name}}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 会员信息 -->
|
||||
<!-- <view class="cards">
|
||||
<view class="cards">
|
||||
<view class="card">
|
||||
<view class="card-content">
|
||||
<image class="cover" src="@/static/dev/good_cover_01.png" mode="aspectFill"></image>
|
||||
@@ -35,9 +35,9 @@
|
||||
</view>
|
||||
<view class="cards-back"></view>
|
||||
<image class="cards-angle" src="@/static/imgs/vip-angle-back.png" mode="widthFix"></image>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 会员权限 -->
|
||||
<!-- <view class="privilege">
|
||||
<view class="privilege">
|
||||
<view class="title">开通会员享特权</view>
|
||||
<view class="privilege-box">
|
||||
<view class="item" v-for="(item, index) in rights" :key="index" @click="showRemark(item.name, item.remark)">
|
||||
@@ -45,18 +45,18 @@
|
||||
<view class="text">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 会员 -->
|
||||
<!-- <view class="footer">
|
||||
<view class="footer">
|
||||
<button class="footer-btn" type="default" @click="openOrder">¥{{identities[tabsIndex].price}}/年 开通</button>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 会员服务信息 -->
|
||||
<!-- <view class="notice">
|
||||
<view class="notice">
|
||||
<view class="title">开通须知</view>
|
||||
<view class="item">
|
||||
<text>{{description}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -74,18 +74,18 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// identities().then(res => {
|
||||
// this.loding = false
|
||||
// this.user = res.user
|
||||
// this.description= res.description
|
||||
// this.identities = res.identities
|
||||
// this.rights = res.identities[0].rights
|
||||
// }).catch(err =>{
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon : 'none'
|
||||
// })
|
||||
// })
|
||||
identities().then(res => {
|
||||
this.loding = false
|
||||
this.user = res.user
|
||||
this.description= res.description
|
||||
this.identities = res.identities
|
||||
this.rights = res.identities[0].rights
|
||||
}).catch(err =>{
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 切换开通身份
|
||||
|
||||
File diff suppressed because one or more lines are too long
1665
unpackage/dist/dev/app-plus/app-service.js
vendored
1665
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
1817
unpackage/dist/dev/app-plus/app-view.js
vendored
1817
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user