yujialong 1 year ago
parent 66b112f80f
commit 0d1dd45c8b
  1. 4
      config/request.js
  2. 5
      order/addCourse/addCourse.vue
  3. 28
      order/orderDetail/orderDetail.vue
  4. 6
      order/productDetail/productDetail.vue
  5. 10
      order/products/products.vue
  6. 2
      pages.json
  7. 95
      pages/index/index.vue
  8. 4
      pages/person/person.vue
  9. BIN
      static/image/index/banner.png
  10. BIN
      static/image/product/shop-blue1.png

@ -5,9 +5,9 @@
*/ */
export default { export default {
baseURL: 'https://huorantech.cn/', // baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.152:9000/', // baseURL: 'http://192.168.31.152:9000/',
// baseURL: 'http://121.37.12.51/', baseURL: 'http://121.37.12.51/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -18,7 +18,7 @@
<li v-for="(item, i) in list" :key="i"> <li v-for="(item, i) in list" :key="i">
<uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox> <uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox> <uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)"></image>
{{ item.productName }} {{ item.productName }}
</li> </li>
</ul> </ul>
@ -358,7 +358,10 @@
} }
.icon { .icon {
width: 80rpx; width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin: 0 20rpx; margin: 0 20rpx;
border-radius: 4px;
} }
} }
/deep/.check { /deep/.check {

@ -12,7 +12,7 @@
<view v-if="isDetail" class="val">{{ form.customerName }}</view> <view v-if="isDetail" class="val">{{ form.customerName }}</view>
<view v-else class="customer-wrap"> <view v-else class="customer-wrap">
<view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view> <view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view>
<view class="create" @click="toClient">找不到客户马上创建</view> <!-- <view class="create" @click="toClient">找不到客户马上创建</view> -->
</view> </view>
</view> </view>
<view class="line" v-if="form.customerName"> <view class="line" v-if="form.customerName">
@ -68,7 +68,7 @@
</view> </view>
<view class="course-action"> <view class="course-action">
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> <image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
<button v-if="(item.authority == 3 || item.authority == 4) && ((item.mallNonAssociatedLinks && item.mallNonAssociatedLinks.length) || item.shipContent)" class="info-btn" type="primary" @click.stop="showShip(item)">发货信息</button> <button v-if="(item.authority == 3 || item.authority == 4) && (!isDetail || (isDetail && item.shipContent))" class="info-btn" type="primary" @click.stop="showShip(item)">发货信息</button>
</view> </view>
</view> </view>
<view class="info"> <view class="info">
@ -134,6 +134,7 @@
<view class="top">请选择客户</view> <view class="top">请选择客户</view>
<uni-icons class="close" type="closeempty" size="20" @click="closeCustomer"></uni-icons> <uni-icons class="close" type="closeempty" size="20" @click="closeCustomer"></uni-icons>
<uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" /> <uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view class="create" @click="toClient">找不到客户马上创建</view>
<view class="list"> <view class="list">
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view> <view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view>
</view> </view>
@ -225,6 +226,7 @@
if (this.orderId) { if (this.orderId) {
this.getInfo() this.getInfo()
} else if (store) { } else if (store) {
console.log(11, store)
// //
const list = [] const list = []
for (const i in store) { for (const i in store) {
@ -232,11 +234,11 @@
} }
this.courseList = store this.courseList = store
this.courses = list this.courses = list
this.$nextTick(() => { // this.$nextTick(() => {
uni.pageScrollTo({ // uni.pageScrollTo({
selector: '#products', // selector: '#products',
}) // })
}) // })
try { try {
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
@ -301,7 +303,6 @@
e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // != 0 && e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // != 0 &&
courses['list' + e.authority].list.push(e) courses['list' + e.authority].list.push(e)
}) })
console.log(123,courses)
this.courseList = courses this.courseList = courses
}).catch(e => {}) }).catch(e => {})
}, },
@ -525,7 +526,6 @@
}, },
// //
showShip(row) { showShip(row) {
console.log(33)
let val = '' let val = ''
row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => { row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => {
val += e.urlName + ':' + e.url + '\n' val += e.urlName + ':' + e.url + '\n'
@ -632,11 +632,12 @@
.customer-wrap { .customer-wrap {
text-align: right; text-align: right;
} }
.create { }
margin-top: 10rpx; .create {
padding: 0 20rpx;
font-size: 20rpx; font-size: 20rpx;
text-align: right;
color: #f00; color: #f00;
}
} }
.pro-wrap { .pro-wrap {
position: relative; position: relative;
@ -668,10 +669,13 @@
padding: 0 16rpx; padding: 0 16rpx;
margin-left: 10rpx; margin-left: 10rpx;
font-size: 28rpx; font-size: 28rpx;
white-space: nowrap;
} }
.left { .left {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
max-width: 480rpx;
margin-right: 10rpx;
} }
.del { .del {
width: 40rpx; width: 40rpx;

@ -49,7 +49,8 @@
<view class="line"> <view class="line">
<text class="name">详情介绍</text> <text class="name">详情介绍</text>
<!-- <view class="val" v-html="form.mall.detailedIntroduction"></view> --> <!-- <view class="val" v-html="form.mall.detailedIntroduction"></view> -->
<mp-html class="val" :content="form.mall.detailedIntroduction"/> <!-- <mp-html class="val" :content="form.mall.detailedIntroduction"/> -->
<text class="val">{{ form.mall.detailedIntroduction }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -94,7 +95,7 @@
<view class="footer"> <view class="footer">
<view v-if="auth('产品:购物车')" class="shop" @click="$util.to('../shopCart/shopCart')"> <view v-if="auth('产品:购物车')" class="shop" @click="$util.to('../shopCart/shopCart')">
<uni-badge size="small" :text="shopCartTotal" absolute="topRight" type="error"> <uni-badge size="small" :text="shopCartTotal" absolute="topRight" type="error">
<image class="icon" src="@/static/image/product/shop.png" mode="widthFix"></image> <image class="icon" src="@/static/image/product/shop-blue1.png" mode="widthFix"></image>
</uni-badge> </uni-badge>
<view>购物车</view> <view>购物车</view>
</view> </view>
@ -163,6 +164,7 @@
detailsOfGoods(this.id).then(res => { detailsOfGoods(this.id).then(res => {
const e = res.orderDetails const e = res.orderDetails
e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction) e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction)
e.mall.detailedIntroduction = this.$util.removeTag(e.mall.detailedIntroduction)
this.form = e this.form = e
const pics = this.form.mall.interfaceDiagram const pics = this.form.mall.interfaceDiagram
if (pics) { if (pics) {

@ -32,7 +32,7 @@
<ul class="list"> <ul class="list">
<li v-for="(item, i) in list" :key="i" @click="toDetail(item)"> <li v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<view class="pro-name"> <view class="pro-name">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)"></image>
{{ item.productName }} {{ item.productName }}
</view> </view>
<view class="info"> <view class="info">
@ -179,7 +179,7 @@
this.form.tagId = +tagId || '' this.form.tagId = +tagId || ''
if (tagId) { if (tagId) {
this.filterForm.tagId = [+tagId] this.filterForm.tagId = [+tagId]
this.tagName = tagsName // this.tagName = tagsName
} }
this.keyword = options.keyword || '' this.keyword = options.keyword || ''
@ -349,11 +349,13 @@
align-items: center; align-items: center;
padding: 18rpx 0; padding: 18rpx 0;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600;
color: #333; color: #333;
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
.icon { .icon {
width: 52rpx; width: 58rpx;
height: 52rpx; min-width: 58rpx;
height: 58rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
} }

@ -294,7 +294,7 @@
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"fontSize": "16px", "fontSize": "16px",
"iconWidth": "30px", "iconWidth": "45px",
"list": [{ "list": [{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/image/tab1.png", "iconPath": "static/image/tab1.png",

@ -1,9 +1,11 @@
<template> <template>
<view :class="['page', {oh: !per}]"> <view :class="[{oh: !per}]">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" /> <image class="banner" src="@/static/image/index/banner.png" mode="widthFix"></image>
<view class="banner"> <view class="page">
<image class="img" src="@/static/image/index/banner.png" mode="widthFix"></image> <view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" />
<view class="all" @click="toProduct">全部产品</view>
</view> </view>
<view class="block" style="margin-top: 0"> <view class="block" style="margin-top: 0">
@ -30,12 +32,8 @@
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell">{{ item.productIntroduction }}</view> <view class="des ell">{{ item.typeName }}</view>
<view class="meta"> <view class="meta">{{ item.marketUnitPrice }}/</view>
<image class="icon" src="@/static/image/index/9.png"></image>
适用专业:
<text class="ell">{{ item.professionalName }}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -52,24 +50,27 @@
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell">{{ item.productIntroduction }}</view> <view class="des ell">{{ item.typeName }}</view>
<view class="meta"> <view class="meta">{{ item.marketUnitPrice }}/</view>
<image class="icon" src="@/static/image/index/9.png"></image>
适用专业:
<text class="ell">{{ item.professionalName }}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="auth('产品:购物车')" class="plus">
<uni-badge size="small" :text="total" absolute="topRight" type="error">
<image class="icon" src="@/static/image/product/shop-blue.png" mode="widthFix" @click="$util.to('../shopCart/shopCart')"></image>
</uni-badge>
</view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view> <view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
</view> </view>
</template> </template>
<script> <script>
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' import { getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { tagsList, listOfGoods } from '@/apis/modules/product.js' import { tagsList, listOfGoods, shoppingCartList } from '@/apis/modules/product.js'
import { getTeamsByAccountId } from '@/apis/modules/client.js' import { getTeamsByAccountId } from '@/apis/modules/client.js'
export default { export default {
data() { data() {
@ -81,12 +82,14 @@
tags: [], tags: [],
hotProducts: [], hotProducts: [],
offcialProducts: [], offcialProducts: [],
total: 0,
} }
}, },
onShow() { onShow() {
this.keyword = '' this.keyword = ''
this.per = true this.per = true
this.getInfo() this.getInfo()
this.getShopCart()
}, },
methods: { methods: {
// //
@ -167,6 +170,15 @@
this.tags = res.tagsList.slice(0, 8) this.tags = res.tagsList.slice(0, 8)
}).catch(e => {}) }).catch(e => {})
}, },
//
getShopCart() {
shoppingCartList({
pageNum: 1,
pageSize: 1000,
}).then(({ data }) => {
this.total = data.total
}).catch(e => {})
},
// //
getProducts() { getProducts() {
// //
@ -221,32 +233,24 @@
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
position: relative; position: relative;
min-height: 100%;
padding: 10rpx 22rpx; padding: 10rpx 22rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
} }
.banner { .banner {
position: relative;
.img {
width: 100%; width: 100%;
}
.search-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.search {
flex: 1;
} }
.info { }
position: absolute; .all {
top: 80rpx; font-size: 24rpx;
left: 46rpx; color: #666;
}
.title {
margin-bottom: 15rpx;
font-size: 36rpx;
font-weight: 600;
color: #001D67;
}
.text {
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
color: #001D67;
}
} }
.block { .block {
margin: 20rpx 0; margin: 20rpx 0;
@ -254,10 +258,6 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 34rpx; margin-bottom: 34rpx;
.all {
font-size: 24rpx;
color: #666;
}
} }
.title { .title {
display: inline-flex; display: inline-flex;
@ -289,7 +289,7 @@
margin-bottom: 18rpx; margin-bottom: 18rpx;
} }
.text { .text {
width: 110rpx; width: 165rpx;
margin: 0 auto; margin: 0 auto;
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;
@ -298,12 +298,14 @@
.list { .list {
.item { .item {
display: flex; display: flex;
align-items: center;
margin-bottom: 28rpx; margin-bottom: 28rpx;
} }
.pic { .pic {
width: 136rpx; width: 120rpx;
height: 136rpx; height: 120rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 8px;
} }
.texts { .texts {
width: calc(100% - 156rpx); width: calc(100% - 156rpx);
@ -314,7 +316,7 @@
color: #333; color: #333;
} }
.des { .des {
margin: 17rpx 0; margin: 10rpx 0;
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
} }
@ -333,4 +335,11 @@
} }
} }
} }
.plus {
bottom: 140rpx;
right: 60rpx;
.icon {
width: 80rpx;
}
}
</style> </style>

@ -293,8 +293,8 @@
align-items: center; align-items: center;
} }
.icon { .icon {
width: 48rpx; width: 40rpx;
height: 48rpx; height: 40rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
text { text {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Loading…
Cancel
Save