|
|
@ -28,7 +28,7 @@ |
|
|
|
<view class="texts"> |
|
|
|
<view class="texts"> |
|
|
|
<view class="line"> |
|
|
|
<view class="line"> |
|
|
|
<text class="name">产品简介:</text> |
|
|
|
<text class="name">产品简介:</text> |
|
|
|
<view class="val" v-html="form.mall.productIntroduction"></view> |
|
|
|
<text class="val">{{ form.mall.productIntroduction }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="line"> |
|
|
|
<view class="line"> |
|
|
|
<text class="name">适用专业:</text> |
|
|
|
<text class="name">适用专业:</text> |
|
|
@ -48,30 +48,27 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<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"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="form.interfaceDiagram" class="detail"> |
|
|
|
<view v-if="form.interfaceDiagram" class="detail" id="pics"> |
|
|
|
<view class="title mb"> |
|
|
|
<view class="title mb"> |
|
|
|
<image class="icon" src="@/static/image/product/4.png"></image> |
|
|
|
<image class="icon" src="@/static/image/product/4.png"></image> |
|
|
|
产品界面图 |
|
|
|
产品界面图 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uni-swiper-dot :info="info" field="content" mode="round"> |
|
|
|
<uni-swiper-dot :info="form.interfaceDiagram.length > 1 ? form.interfaceDiagram : 0" field="content" mode="round" :dotsStyles="dotsStyles"> |
|
|
|
<swiper class="swiper-box" @change="change"> |
|
|
|
<swiper class="swiper-box" autoplay> |
|
|
|
<swiper-item v-for="(pic, i) in form.interfaceDiagram" :key="i"> |
|
|
|
<swiper-item v-for="(pic, i) in form.interfaceDiagram" :key="i"> |
|
|
|
<image class="pic" mode="widthFix" :src="pic"></image> |
|
|
|
<image class="pic" mode="widthFix" :src="pic"></image> |
|
|
|
</swiper-item> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</swiper> |
|
|
|
</uni-swiper-dot> |
|
|
|
</uni-swiper-dot> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <template> |
|
|
|
|
|
|
|
<image v-for="(pic, i) in form.mall.interfaceDiagram" :key="i" class="pic" mode="widthFix" :src="pic"></image> |
|
|
|
|
|
|
|
</template> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="form.mallAnnex && form.mallAnnex.length" class="detail"> |
|
|
|
<view v-if="form.mallAnnex && form.mallAnnex.length" class="detail" id="annex"> |
|
|
|
<view class="title-wrap"> |
|
|
|
<view class="title-wrap"> |
|
|
|
<view class="title"> |
|
|
|
<view class="title"> |
|
|
|
<image class="icon" src="@/static/image/product/5.png"></image> |
|
|
|
<image class="icon" src="@/static/image/product/5.png"></image> |
|
|
@ -95,7 +92,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="footer"> |
|
|
|
<view class="footer"> |
|
|
|
<view 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.png" mode="widthFix"></image> |
|
|
|
</uni-badge> |
|
|
|
</uni-badge> |
|
|
@ -103,8 +100,8 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="btns"> |
|
|
|
<view class="btns"> |
|
|
|
<view class="btn" @click="addShop">加入购物车</view> |
|
|
|
<view v-if="auth('产品:加入购物车')" class="btn" @click="addShop">加入购物车</view> |
|
|
|
<view class="btn order" @click="order">下单</view> |
|
|
|
<view v-if="auth('产品:下单')" class="btn order" @click="order">下单</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -121,15 +118,7 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: '详情介绍', |
|
|
|
name: '详情介绍', |
|
|
|
id: 0 |
|
|
|
id: 0 |
|
|
|
}, |
|
|
|
} |
|
|
|
{ |
|
|
|
|
|
|
|
name: '界面图', |
|
|
|
|
|
|
|
id: 1 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '参数', |
|
|
|
|
|
|
|
id: 2 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
classificationIds: [], |
|
|
|
classificationIds: [], |
|
|
@ -141,10 +130,23 @@ |
|
|
|
mallAnnex: [] |
|
|
|
mallAnnex: [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
shopCartTotal: 0, |
|
|
|
shopCartTotal: 0, |
|
|
|
types: [] |
|
|
|
types: [], |
|
|
|
|
|
|
|
dotsStyles: { |
|
|
|
|
|
|
|
backgroundColor: 'rgba(83, 200, 249,0.3)', |
|
|
|
|
|
|
|
border: '1px rgba(83, 200, 249,0.3) solid', |
|
|
|
|
|
|
|
color: '#fff', |
|
|
|
|
|
|
|
selectedBackgroundColor: 'rgba(83, 200, 249,0.9)', |
|
|
|
|
|
|
|
selectedBorder: '1px rgba(83, 200, 249,0.9) solid' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
|
|
|
|
this.tabs = [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '详情介绍', |
|
|
|
|
|
|
|
id: 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
const pages = getCurrentPages() |
|
|
|
const pages = getCurrentPages() |
|
|
|
const { options } = pages[pages.length - 1] |
|
|
|
const { options } = pages[pages.length - 1] |
|
|
|
this.id = options.id |
|
|
|
this.id = options.id |
|
|
@ -159,9 +161,21 @@ |
|
|
|
title: '加载中' |
|
|
|
title: '加载中' |
|
|
|
}) |
|
|
|
}) |
|
|
|
detailsOfGoods(this.id).then(res => { |
|
|
|
detailsOfGoods(this.id).then(res => { |
|
|
|
this.form = res.orderDetails |
|
|
|
const e = res.orderDetails |
|
|
|
|
|
|
|
e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction) |
|
|
|
|
|
|
|
this.form = e |
|
|
|
const pics = this.form.mall.interfaceDiagram |
|
|
|
const pics = this.form.mall.interfaceDiagram |
|
|
|
if (pics) this.form.interfaceDiagram = pics.split(',') |
|
|
|
if (pics) { |
|
|
|
|
|
|
|
this.form.interfaceDiagram = pics.split(',') |
|
|
|
|
|
|
|
this.tabs.push({ |
|
|
|
|
|
|
|
name: '界面图', |
|
|
|
|
|
|
|
id: 1 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.form.mallAnnex && this.form.mallAnnex.length && this.tabs.push({ |
|
|
|
|
|
|
|
name: '参数', |
|
|
|
|
|
|
|
id: 2 |
|
|
|
|
|
|
|
}) |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
|
}).catch(e => { |
|
|
|
}).catch(e => { |
|
|
|
uni.hideLoading() |
|
|
|
uni.hideLoading() |
|
|
@ -183,8 +197,14 @@ |
|
|
|
}).catch(e => {}) |
|
|
|
}).catch(e => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// tab切换 |
|
|
|
// tab切换 |
|
|
|
tabChange(tab) { |
|
|
|
tabChange({ id }) { |
|
|
|
this.curTab = tab.id |
|
|
|
this.curTab = id |
|
|
|
|
|
|
|
id == 1 && uni.pageScrollTo({ |
|
|
|
|
|
|
|
selector: '#pics', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
id == 2 && uni.pageScrollTo({ |
|
|
|
|
|
|
|
selector: '#annex', |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下载全部 |
|
|
|
// 下载全部 |
|
|
|
downloadAll() { |
|
|
|
downloadAll() { |
|
|
@ -231,37 +251,31 @@ |
|
|
|
const classificationId = this.form.classificationIds[0] |
|
|
|
const classificationId = this.form.classificationIds[0] |
|
|
|
const authority = this.$util.getOrderType(classificationId) |
|
|
|
const authority = this.$util.getOrderType(classificationId) |
|
|
|
// 把该产品添加至缓存 |
|
|
|
// 把该产品添加至缓存 |
|
|
|
uni.setStorageSync('courses', { |
|
|
|
uni.setStorageSync('courses', [{ |
|
|
|
['list' + authority]: { |
|
|
|
dataOrCourseId: mall.associatedProduct, // id |
|
|
|
shrink: false, |
|
|
|
mallId: mall.mallId, |
|
|
|
name: this.form.goodsRes.classificationName, |
|
|
|
productName: mall.productName, // 名称 |
|
|
|
list: [{ |
|
|
|
periodOfUse: '', // 使用期限 |
|
|
|
dataOrCourseId: mall.associatedProduct, // id |
|
|
|
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), // 开始 |
|
|
|
mallId: mall.mallId, |
|
|
|
endTime: '', // 终止 |
|
|
|
productName: mall.productName, // 名称 |
|
|
|
remainingPeriod: '', // 剩余期限 |
|
|
|
periodOfUse: '', // 使用期限 |
|
|
|
marketValue: '', // 市场价 |
|
|
|
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), // 开始 |
|
|
|
marketPrice: mall.marketUnitPrice, // 市场单价 |
|
|
|
endTime: '', // 终止 |
|
|
|
finalPrice: 0, // 成交价 |
|
|
|
remainingPeriod: '', // 剩余期限 |
|
|
|
finalValue: 0, // 成交单价(数据产品特有) |
|
|
|
marketValue: '', // 市场价 |
|
|
|
discountRate: '0%', // 折扣率 |
|
|
|
marketPrice: mall.marketUnitPrice, // 市场单价 |
|
|
|
accountNum: 1, // 账号数 |
|
|
|
finalPrice: 0, // 成交价 |
|
|
|
totalAmount: '', // 总价 |
|
|
|
finalValue: 0, // 成交单价(数据产品特有) |
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
discountRate: '0%', // 折扣率 |
|
|
|
ship: 0, // 发货否(0未发货,1已发货,默认不发货) |
|
|
|
accountNum: 1, // 账号数 |
|
|
|
authority, // 区分权限 |
|
|
|
totalAmount: '', // 总价 |
|
|
|
options: 2, |
|
|
|
isEnable: 0, // 启用否:1启用,0禁用 |
|
|
|
miniProgramPictureAddress: mall.appletIcon || '', // 图标 |
|
|
|
ship: 0, // 发货否(0未发货,1已发货,默认不发货) |
|
|
|
settlementPrice: 0, // 结算价 |
|
|
|
authority, // 区分权限 |
|
|
|
settlementPriceUnit: 0, // 结算单价 |
|
|
|
options: 2, |
|
|
|
serviceFee: 0 // 平台服务费(前端计算后展示,不入库) |
|
|
|
miniProgramPictureAddress: mall.appletIcon || '', // 图标 |
|
|
|
}]) |
|
|
|
settlementPrice: 0, // 结算价 |
|
|
|
this.$util.to(`/order/editCourse/editCourse`) |
|
|
|
settlementPriceUnit: 0, // 结算单价 |
|
|
|
|
|
|
|
serviceFee: 0 // 平台服务费(前端计算后展示,不入库) |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.$util.to(`/order/orderDetail/orderDetail`) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -284,6 +298,7 @@ |
|
|
|
.pro-title { |
|
|
|
.pro-title { |
|
|
|
margin-top: 22rpx; |
|
|
|
margin-top: 22rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
|
|
|
|
font-weight: 600; |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
.fields { |
|
|
|
.fields { |
|
|
@ -306,7 +321,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
.tabs { |
|
|
|
.tabs { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
justify-content: space-around; |
|
|
|
|
|
|
|
margin-bottom: 32rpx; |
|
|
|
margin-bottom: 32rpx; |
|
|
|
li { |
|
|
|
li { |
|
|
|
width: 33.33%; |
|
|
|
width: 33.33%; |
|
|
@ -356,6 +370,7 @@ |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
font-size: 30rpx; |
|
|
|
font-size: 30rpx; |
|
|
|
|
|
|
|
font-weight: 600; |
|
|
|
color: #333 ; |
|
|
|
color: #333 ; |
|
|
|
.icon { |
|
|
|
.icon { |
|
|
|
width: 36rpx; |
|
|
|
width: 36rpx; |
|
|
|