Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="header">
|
||||
<div class="num">
|
||||
<p>积分余额</p>
|
||||
<h3>562</h3>
|
||||
<h3>{{total}}</h3>
|
||||
</div>
|
||||
<div class="btn" @click="toMyOrder">我的订单</div>
|
||||
</div>
|
||||
@@ -23,8 +23,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<u-waterfall v-model="flowList">
|
||||
<div class="list-content" v-if="goodsList.length">
|
||||
<u-waterfall v-model="goodsList">
|
||||
<template v-slot:left="{leftList}">
|
||||
<div v-for="(item, index) in leftList" :key="index" @click="toProductDetail(item)">
|
||||
<div class="item">
|
||||
@@ -33,33 +33,37 @@
|
||||
<div class="content">
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>50积分</h3>
|
||||
<p>+¥2.00</p>
|
||||
<span>兑换后再付</span>
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div class="btn btn0">去兑换</div>
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.status == 1 && item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" :class="`btn`+item.status" v-else>商品缺货</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:right="{rightList}">
|
||||
<div v-for="(item, index) in rightList" :key="index">
|
||||
<div v-for="(item, index) in rightList" :key="index" @click="toProductDetail(item)">
|
||||
<div class="item">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/watermark/8.png" alt="">
|
||||
<div class="type type0">京东低价商品</div>
|
||||
<img :src="item.picUrl" alt="">
|
||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGType', item.type) }}</div>
|
||||
<div class="content">
|
||||
<p class="text">无染(wuro)本色抽纸无染(wuro)本色抽纸无无染(wuro)本色抽纸无染(wuro)本色抽</p>
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>50积分</h3>
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div class="btn btn0">去兑换</div>
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.status == 1 && item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" :class="`btn`+item.status" v-else>商品缺货</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</u-waterfall>
|
||||
</div>
|
||||
<!-- <AiEmpty v-else></AiEmpty> -->
|
||||
<AiEmpty v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -86,25 +90,45 @@ export default {
|
||||
currentPoint: 0,
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
flowList: [],
|
||||
goodsList: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getToatl()
|
||||
this.$dict.load(['integralSGType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getToatl() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.total = res.data.integral || 0
|
||||
}
|
||||
})
|
||||
},
|
||||
getListInit() {
|
||||
|
||||
this.goodsList = []
|
||||
this.leftList = []
|
||||
this.rightList = []
|
||||
this.current = 1
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`).then(res => {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`, null, {
|
||||
params: {
|
||||
goodsType: this.currentTabs, //商品类型,0:全部、1:免费兑、2:京东低价商品,默认0
|
||||
orderType: this.currentType == 0 ? 1 : 0, //排序类型,0:积分升序、1:上架时间倒序,默认0
|
||||
filterIntegral: this.currentType == 2 ? true : false, //过滤我可兑换的,默认false
|
||||
integralRange: this.currentType == 1 ? this.currentPoint : '', //积分区间类型,0:全部、1:50分以下、2:100分以下、3:200分以下、4:5000分以下默认0
|
||||
current: this.current
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.flowList = res.data.records
|
||||
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
|
||||
if(res.data && res.data.records.length) {
|
||||
res.data.records.map((item, index) => {
|
||||
if(index%2 == 0) {
|
||||
@@ -119,26 +143,31 @@ export default {
|
||||
},
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
// this.getListInit()
|
||||
this.getListInit()
|
||||
},
|
||||
typeClick(index) {
|
||||
this.currentType = index
|
||||
// this.getListInit()
|
||||
this.getListInit()
|
||||
},
|
||||
pointClick(index) {
|
||||
this.currentPoint = index
|
||||
// this.getListInit()
|
||||
this.getListInit()
|
||||
},
|
||||
toProductDetail(item) {
|
||||
uni.navigateTo({url: `./productDetails?id=${item.id}`})
|
||||
uni.navigateTo({url: `./productDetails?shopGoodsId=${item.shopGoodsId}&total=${this.total}`})
|
||||
},
|
||||
toMyOrder() {
|
||||
uni.navigateTo({url: './myOrderList'})
|
||||
}
|
||||
},
|
||||
toOrder(item) {
|
||||
if(this.total >= item.integralPrice && item.stock > 0) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${item.shopGoodsId}&total=${this.total}&backLevel=2`})
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current = this.current + 1
|
||||
// this.getList()
|
||||
this.current = this.current + 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -228,6 +257,8 @@ export default {
|
||||
img {
|
||||
width: 100%;
|
||||
height: 340px;
|
||||
border-top-left-radius: 20px;
|
||||
border-top-right-radius: 20px;
|
||||
}
|
||||
.type {
|
||||
padding: 8px 16px;
|
||||
@@ -301,11 +332,11 @@ export default {
|
||||
bottom: 24px;
|
||||
right: 16px;
|
||||
}
|
||||
.btn0 {
|
||||
.btn1 {
|
||||
background-color: #2D7DFF;
|
||||
color: #FFF;
|
||||
}
|
||||
.btn1 {
|
||||
.btn0 {
|
||||
background-color: #E2E2E2;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
20
src/project/fengdu/AppRedemptionPoints/jdH5.vue
Normal file
20
src/project/fengdu/AppRedemptionPoints/jdH5.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="jdH5">
|
||||
<web-view :src="goodsJdUrl"></web-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'jdH5',
|
||||
data() {
|
||||
return {
|
||||
goodsJdUrl: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.goodsJdUrl = option.goodsJdUrl
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -4,36 +4,37 @@
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="90" font-size="28" bg-color="#fff" inactive-color="#8891A1"
|
||||
active-color="#1D2229 " :bar-style="barStyle" @change="changeTab" ></u-tabs>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="item">
|
||||
<div class="list-content" v-if="list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="time-flex">
|
||||
<p>2022-05-25 17:45</p>
|
||||
<div>已完成</div>
|
||||
<p>{{item.createTime.substring(0, 16)}}</p>
|
||||
<div :class="`status`+item.status">{{ $dict.getLabel('integralSGOStatus', item.status) }}</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/watermark/8.png" alt="">
|
||||
<div class="type type0"><p>京东低价商品</p></div>
|
||||
<img :src="item.goodsPicUrl" alt="">
|
||||
<div class="type" :class="`type`+item.goodsType">{{ $dict.getLabel('integralSGType', item.goodsType) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)无染(wuro)本色抽纸无染无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)无染(wuro)</p>
|
||||
<p>{{item.goodsTitle}}</p>
|
||||
<div class="num-flex">
|
||||
<h3>50积分<span>+2元</span></h3>
|
||||
<div>x 1</div>
|
||||
<h3>{{item.usedIntegral}}积分<span v-if="item.goodsType == 1">+{{item.payMoney}}元</span></h3>
|
||||
<div>x {{item.quantity}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||
<p class="remark">备注:不太好用不太好用不太好用不太好用不太好用不太好用不太好用不太好用不太好用不太好用不太好用</p>
|
||||
<div class="flex-btn">
|
||||
<p>核销码:<span>58555</span></p>
|
||||
<div class="btn">取消订单</div>
|
||||
</div>
|
||||
<div class="flex-btn">
|
||||
<p class="tips" v-if="item.type == 1"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||
<p class="tips" v-else>免费兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
<p class="remark" v-if="item.remarks">备注:{{item.remarks}}</p>
|
||||
<div class="flex-btn" v-if="item.goodsType == 1">
|
||||
<p></p>
|
||||
<div class="btn confirm">去购买</div>
|
||||
<div class="btn confirm" @click="openJd(item)">去购买</div>
|
||||
</div>
|
||||
<div class="flex-btn" v-else>
|
||||
<p>核销码:<span>{{item.verificationCode}}</span></p>
|
||||
<div class="btn" v-if="item.status == 0" @click="cancel(item)">取消订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <AiEmpty v-else></AiEmpty> -->
|
||||
<AiEmpty v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -54,23 +55,68 @@ export default {
|
||||
'bottom': '3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.$dict.load(['integralSGOStatus', 'integralSGType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
// this.getListInit()
|
||||
this.getListInit()
|
||||
},
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/listForXCX`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
status: this.currentTabs == 0 ? '' : this.currentTabs - 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
openJd(item) {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${item.goodsJdUrl}`})
|
||||
},
|
||||
cancel(item) {
|
||||
uni.showModal({
|
||||
title: '确认取消此订单?',
|
||||
content: '取消订单后,积分将退回至积分余额',
|
||||
confirmColor: "#2D7DFF",
|
||||
cancelColor: "#2D7DFF",
|
||||
cancelText: "我在想想",
|
||||
confirmText: "确认取消",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.cancelOrder(item)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelOrder(item) {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/cancelForXCX?id=${item.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getListInit()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current = this.current + 1
|
||||
// this.getList()
|
||||
this.current = this.current + 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -92,6 +138,7 @@ export default {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 32px;
|
||||
.time-flex {
|
||||
padding: 0 32px;
|
||||
line-height: 64px;
|
||||
@@ -104,6 +151,9 @@ export default {
|
||||
div {
|
||||
color: #2D7DFF;
|
||||
}
|
||||
.status2 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.flex {
|
||||
padding: 32px 32px 0;
|
||||
@@ -132,10 +182,10 @@ export default {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type0 {
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
|
||||
@@ -2,34 +2,35 @@
|
||||
<div class="placeOrder">
|
||||
<div class="header-info">
|
||||
<div class="flex">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/watermark/8.png" alt="">
|
||||
<div class="type type0"><p>京东低价商品</p></div>
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGType', goodsInfo.type) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)无染(wuro)本色抽纸无染无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)无染(wuro)</p>
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<div>
|
||||
<u-number-box v-model="value" @change="valChange" input-height="44" size="24" :min="1" :max="100"></u-number-box>
|
||||
<u-number-box v-model="goodsNum" @change="valChange" input-height="44" size="24" :min="1" :max="goodsInfo.stock"></u-number-box>
|
||||
</div>
|
||||
<h3>50积分<span>+¥2.00</span></h3>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 1">+¥{{goodsInfo.payMoney}}.00</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||
<p class="tips" v-if="goodsInfo.type == 1">兑换成功后,点击「去购买」前往京东低价购买</p>
|
||||
<p class="tips" v-else>免费兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item-flex" @click="show=true">
|
||||
<div class="label">订单备注</div>
|
||||
<div class="value color-999">无备注<u-icon name="arrow-right" color="#bbb" size="24"></u-icon></div>
|
||||
<div class="value" :class="value ? '' : 'color-999'">{{value || '无备注'}}<u-icon name="arrow-right" color="#bbb" size="24"></u-icon></div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">积分余额</div>
|
||||
<div class="value color-FF6900">562积分</div>
|
||||
<div class="value color-FF6900">{{total}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">支付积分</div>
|
||||
<div class="value">减100积分</div>
|
||||
<div class="value">减{{goodsNum*goodsInfo.integralPrice}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="item-flex" v-if="goodsInfo.type == 1">
|
||||
<div class="label">京东支付</div>
|
||||
<div class="value color-999">¥4.00</div>
|
||||
<div class="value color-999">¥{{goodsNum*goodsInfo.payMoney}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-popup v-model="show" mode="bottom">
|
||||
@@ -42,7 +43,7 @@
|
||||
<span class="confirm" @click="confirm">保存</span>
|
||||
</div>
|
||||
</u-popup>
|
||||
<div class="bottom-btn" @click="toSuccess()">
|
||||
<div class="bottom-btn" @click="confirmOrder()">
|
||||
<div>提交订单</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,28 +57,56 @@ export default {
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
value: 1,
|
||||
show: false
|
||||
value: '',
|
||||
show: false,
|
||||
total: 0,
|
||||
goodsInfo: {},
|
||||
goodsNum: 1,
|
||||
backLevel: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.backLevel = option.backLevel
|
||||
this.$dict.load(['integralSGType']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
valChange(e) {
|
||||
console.log('当前值为: ' + e.value)
|
||||
this.goodsNum = e.value
|
||||
},
|
||||
confirm() {
|
||||
this.show = false
|
||||
},
|
||||
confirmOrder() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/add`, {
|
||||
shopId: this.goodsInfo.shopId,
|
||||
goodsId: this.goodsInfo.id,
|
||||
remarks: this.value,
|
||||
quantity: this.goodsNum
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
},
|
||||
toSuccess() {
|
||||
uni.navigateTo({url: './successOrder'})
|
||||
var integralPrice = this.goodsNum*this.goodsInfo.integralPrice
|
||||
uni.navigateTo({url: `./successOrder?isFree=${this.goodsInfo.type}&integralPrice=${integralPrice}&backLevel=${this.backLevel}&goodsJdUrl=${this.goodsInfo.goodsJdUrl}`})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current = this.current + 1
|
||||
// this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -113,10 +142,10 @@ export default {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type0 {
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
|
||||
173
src/project/fengdu/AppRedemptionPoints/pointsPublicity.vue
Normal file
173
src/project/fengdu/AppRedemptionPoints/pointsPublicity.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<div class="pointsPublicity">
|
||||
<div class="header">
|
||||
<img :src="`${cdn}/publicity-header.png`" alt="">
|
||||
<div class="title">第五网格积分公示</div>
|
||||
</div>
|
||||
<div class="list-content" v-if="list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<span class="blue-tips"></span>
|
||||
<p class="title">家事</p>
|
||||
<div class="item-info">
|
||||
<p class="mini-title">个人与家庭相关事</p>
|
||||
<div class="text-flex">
|
||||
<p>个人卫生(勤洗头、爱干净,衣冠整洁)</p>
|
||||
<div>
|
||||
<img :src="`${cdn}/star-icon.png`" alt="">+{{item.integral}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-info">
|
||||
<p class="mini-title">个人与家庭相关事</p>
|
||||
<div class="text-flex">
|
||||
<p>个人卫生(勤洗头、爱干净,衣冠整洁)</p>
|
||||
<div>
|
||||
<img :src="`${cdn}/star-icon.png`" alt="">+50
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-info">
|
||||
<p class="mini-title">个人与家庭相关事</p>
|
||||
<div class="text-flex">
|
||||
<p>个人卫生(勤洗头、爱干净,衣冠整洁)</p>
|
||||
<div>
|
||||
<img :src="`${cdn}/star-icon.png`" alt="">+50
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'pointsPublicity',
|
||||
appName: '积分公示',
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/fengdu",
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralpublicityinfo/list?current=${this.current}&girdId=`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
background-color: #fff;
|
||||
}
|
||||
.pointsPublicity {
|
||||
.header {
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
width: 100%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #222;
|
||||
line-height: 40px;
|
||||
padding: 38px 32px;
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 0 32px;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
box-shadow: inset 0 0 0 0 #EEEEEE;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
.blue-tips {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 0;
|
||||
width: 8px;
|
||||
height: 36px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.item-info {
|
||||
width: 100%;
|
||||
padding: 32px 0;
|
||||
border-top: 1px solid #eee;
|
||||
.mini-title {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.text-flex {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
p {
|
||||
width: calc(100% - 160px);
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
}
|
||||
div {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
font-family: DINAlternate-Bold;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
color: #FF7109;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-info:nth-of-type(2) {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,25 +1,21 @@
|
||||
<template>
|
||||
<div class="productDetails">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/watermark/8.png" alt="">
|
||||
<div class="type type0">免费兑</div>
|
||||
<div class="productDetails" v-if="goodsInfo.picUrl">
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGType', goodsInfo.type) }}</div>
|
||||
<div class="product-info">
|
||||
<p>无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)本色抽纸无染(wuro)本色抽纸</p>
|
||||
<h3>50积分<span>+¥2.00<span>(兑换后再付)</span></span></h3>
|
||||
<div>零售单价¥10.00</div>
|
||||
<span class="tips">免费兑换商品,可到固定的兑换点进行「核销兑换」</span>
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 1">+¥{{goodsInfo.payMoney}}<span v-if="goodsInfo.type == 1">(兑换后再付)</span></span></h3>
|
||||
<div>零售单价¥{{goodsInfo.retailPrice}}</div>
|
||||
<span class="tips" v-if="goodsInfo.type == 1">兑换成功后,点击「去购买」前往京东低价购买</span>
|
||||
<span class="tips" v-else>免费兑换商品,可到固定的兑换点进行「核销兑换」</span>
|
||||
</div>
|
||||
<div class="product-content">
|
||||
<p>商品描述:</p>
|
||||
<p>“本色”最早起源于南朝刘勰《文心雕龙》_
|
||||
“李”蟹悬架于栗龍登花《文温襞垄总理”寿事集色一
|
||||
做过解释,“本色”就是求真,特别较真,有时候有点犟。泉林本色对“本色”的解释是对于生活是一种健康、环保的生活观念。
|
||||
泉林本色是公司在长期的发展过程中逐渐打造的高端产品产品主要是涉岌泉秣本色生活角箱浆纸。产品种美包括软箱面巾纸、
|
||||
盒抽面巾纸、卷纸、空心卷纸、实心卷纸、扁卷纸、手帕纸、饕币纸、珍宝纸、擦手纸、礼品套装等,种类齐全,在各个生活
|
||||
的细微之处全面呵护消费者的健康。
|
||||
</p>
|
||||
<p v-html="goodsInfo.description"></p>
|
||||
</div>
|
||||
<div class="btn" @click="toPlaceOrder()">
|
||||
<div class="status0">立即兑换</div>
|
||||
<div class="btn" @click="toOrder()">
|
||||
<div :class="total >= goodsInfo.integralPrice ? 'status1' : 'status0'" v-if="goodsInfo.status == 1 && goodsInfo.stock > 0">{{total >= goodsInfo.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="status0" v-else>商品缺货</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -32,23 +28,34 @@ export default {
|
||||
appName: '兑换商品',
|
||||
data() {
|
||||
return {
|
||||
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {},
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.$dict.load(['integralSGType']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toPlaceOrder() {
|
||||
uni.navigateTo({url: './placeOrder'})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current = this.current + 1
|
||||
// this.getList()
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
toOrder() {
|
||||
if(this.total >= this.goodsInfo.integralPrice && this.goodsInfo.stock > 0 && this.goodsInfo.status == 1) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${this.goodsInfo.shopGoodsId}&total=${this.total}&backLevel=3`})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -73,10 +80,10 @@ export default {
|
||||
padding: 16px 16px 16px 36px;
|
||||
border-bottom-left-radius: 40px;
|
||||
}
|
||||
.type0 {
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.product-info {
|
||||
@@ -158,11 +165,11 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
}
|
||||
.status0 {
|
||||
.status1 {
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
}
|
||||
.status1 {
|
||||
.status0 {
|
||||
color: #666;
|
||||
background: #E2E2E2;
|
||||
}
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<template>
|
||||
<div class="successOrder">
|
||||
<img src="./img/success.png" alt="">
|
||||
<div v-if="isOrder">
|
||||
<h3>提交成功</h3>
|
||||
<p>提交「免费兑」订单成功,扣减 <span>50积分</span></p>
|
||||
<div class="btn-flex">
|
||||
<div>返回</div>
|
||||
<div>查看订单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<div v-if="isFree == 1">
|
||||
<h3>兑换成功</h3>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>50积分</span>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>{{integralPrice}}积分</span>
|
||||
可点击下方按钮前往京东商城进行低价购买
|
||||
</p>
|
||||
<div class="btn">去购买</div>
|
||||
<div class="btn" @click="openJd">去购买</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3>提交成功</h3>
|
||||
<p>提交「免费兑」订单成功,扣减 <span>{{integralPrice}}积分</span></p>
|
||||
<div class="btn-flex">
|
||||
<div @click="back">返回</div>
|
||||
<div @click="toOrderList">查看订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -27,21 +28,33 @@ export default {
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
isOrder: false
|
||||
isFree: 0, // 0免费 1京东
|
||||
integralPrice: 0,
|
||||
backLevel: 1,
|
||||
goodsJdUrl: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
onLoad(option) {
|
||||
this.isFree = option.isFree
|
||||
this.integralPrice = option.integralPrice
|
||||
this.backLevel = option.backLevel
|
||||
this.goodsJdUrl = option.goodsJdUrl
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.current = this.current + 1
|
||||
// this.getList()
|
||||
openJd() {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${this.goodsJdUrl}`})
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({delta: this.backLevel})
|
||||
},
|
||||
toOrderList() {
|
||||
uni.redirectTo({
|
||||
url: './myOrderList'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user