作者 韩昌

10.47修改bug

正在显示 49 个修改的文件 包含 902 行增加705 行删除
export default {
// 上传图片
upload (url, callBack) {
upload(url, callBack) {
let arr = {}
uni.chooseImage({
success: chooseImageRes => {
... ... @@ -26,34 +26,34 @@ export default {
},
//支付
pay(res) {
if(res.appId) {
if (res.appId) {
uni.requestPayment({
"provider": "wxpay",
provider: 'wxpay',
timeStamp: res.timeStamp, // 时间戳(单位:秒)
nonceStr: res.nonceStr, // 随机字符串1
package: res.package, // 固定值
signType: res.signType, // 签名,这里用的 MD5/RSA 签名
appid: res.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致1
paySign:res.paySign,
paySign: res.paySign,
success(res) {
console.log('支付成功')
uni.showToast({ title: '支付成功~'})
setTimeout(()=>{
uni.showToast({ title: '支付成功~' })
setTimeout(() => {
uni.navigateBack()
},1500)
}, 1500)
},
fail(e) {
console.log('支付失败',e)
uni.showToast({ title: '支付取消~', icon: "none", })
console.log('支付失败', e)
uni.showToast({ title: '支付取消~', icon: 'none' })
}
})
}
},
// 提示,一秒后返回上一页
showTN(title) {
uni.showToast({title: title,icon:"none"})
setTimeout(()=>{
uni.showToast({ title: title, icon: 'none' })
setTimeout(() => {
uni.navigateBack()
},1000)
}, 1000)
}
}
... ...
... ... @@ -4,12 +4,12 @@
<u-popup :show="modeShow" bgColor="#F6F8FA" :closeable="true" round="12" @close="canclePop">
<view class="popBox iosAuto">
<view class="title">选择支付方式</view>
<view class="popModeBox flexJ" v-for="(item,index) in payMode" :key="item.id" @click="checkPay(index)">
<view class="popModeBox flexJ" v-for="(item, index) in payMode" :key="item.id" @click="checkPay(index)">
<view class="mode flexA">
<image :src="item.modeUrl" mode=""></image>
{{item.name}}
{{ item.name }}
</view>
<image v-if="item.shows" :src=" defaultMode == index ? '/static/shopCarIc/modeCheck.png': '/static/shopCarIc/checks.png'" mode=""></image>
<image v-if="item.shows" :src="defaultMode == index ? '/static/shopCarIc/modeCheck.png' : '/static/shopCarIc/checks.png'" mode=""></image>
<view class="insufficient flexA" v-else @click="goRecharge">
余额不足
<view class="go flexA">
... ... @@ -25,127 +25,129 @@
</template>
<script setup>
import { ref,reactive,onMounted,getCurrentInstance,defineEmits,watchEffect } from 'vue'
import {onShow,onLoad} from '@dcloudio/uni-app'
import { getPay,getOrderPay,getCarPay } from '@/api/'
const props = defineProps({
payParams:{
type:Object,
default:{}
import { ref, reactive, onMounted, getCurrentInstance, defineEmits, watchEffect } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getPay, getOrderPay, getCarPay } from '@/api/'
const props = defineProps({
payParams: {
type: Object,
default: {}
},
modeShow:{
type:Boolean,
default:false
modeShow: {
type: Boolean,
default: false
},
adressId:{
type:String,
default:''
adressId: {
type: String,
default: ''
},
// 商品总价
totalPrice:{
type:String,
default:0
totalPrice: {
type: String,
default: 0
},
// 余额
balance:{
type:String,
default:0
balance: {
type: String,
default: 0
},
// 是否订单支付
isOrderPay:{
type:Boolean,
default:false
isOrderPay: {
type: Boolean,
default: false
},
orderId:{
type:String,
default:''
orderId: {
type: String,
default: ''
},
// 购物车id
carId:{
type:String,
default:''
}
})
onMounted(()=> {
setTimeout(()=>{
if(props.totalPrice >props.balance) {
carId: {
type: String,
default: ''
}
})
onMounted(() => {
setTimeout(() => {
if (props.totalPrice > props.balance) {
payMode[1].shows = false
}
},100)
})
watchEffect(()=>{
}, 100)
})
watchEffect(() => {
// console.log('余额',props.balance) 余额不足点击充值,返回页面刷新余额
if(props.totalPrice < props.balance) {
if (props.totalPrice < props.balance) {
payMode[1].shows = true
}
})
// 支付方式数组
const payMode = reactive([{id:1,name:'微信支付',check:true,modeUrl:'/static/shopCarIc/weCaat.png',shows:true},
{id:2,name:'余额支付',check:false,modeUrl:'/static/shopCarIc/yue.png',shows:true}])
// 余额是否为0
let balance = ref(0)
// 默认支付方式
let defaultMode = ref(0)
// 选择支付方式
let checkPay = (index)=> {
})
// 支付方式数组
const payMode = reactive([
{ id: 1, name: '微信支付', check: true, modeUrl: '/static/shopCarIc/weCaat.png', shows: true },
{ id: 2, name: '余额支付', check: false, modeUrl: '/static/shopCarIc/yue.png', shows: true }
])
// 余额是否为0
let balance = ref(0)
// 默认支付方式
let defaultMode = ref(0)
// 选择支付方式
let checkPay = index => {
defaultMode.value = index
}
// 支付方式弹窗提交订单按钮
const subOrder = ()=> {
if(props.car_Id) {
console.log('购物车支付',props.car_Id)
}
// 支付方式弹窗提交订单按钮
const subOrder = () => {
if (props.car_Id) {
console.log('购物车支付', props.car_Id)
getCarPays()
} else {
console.log('dindan支付',props.car_Id)
console.log('dindan支付', props.car_Id)
//订单支付 普通支付
props.isOrderPay ? getOrderPays() : getPays()
}
}
// 去充值
const goRecharge = ()=> {
uni.navigateTo({ url:'/pages/mine/recharge' })
}
const emit = defineEmits(['canclePop'])
const canclePop = ()=> {
}
// 去充值
const goRecharge = () => {
uni.navigateTo({ url: '/pages/mine/recharge' })
}
const emit = defineEmits(['canclePop'])
const canclePop = () => {
emit('canclePop')
}
const { proxy } = getCurrentInstance() //获取当前实例
// 支付
const getPays = async ()=>{
}
const { proxy } = getCurrentInstance() //获取当前实例
// 支付
const getPays = async () => {
try {
let { id,num,specId } = props.payParams
let { id, num, specId } = props.payParams
let params = {
goods_id:id, //integer 是 商品ID
num:num, //integer 是 数量
goods_spec_id:specId, //integer 是 规格ID
address_id:props.adressId, //integer 是 地址ID
fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:1是微信支付,2是余额支付
remark:'' //string 否 备注
goods_id: id, //integer 是 商品ID
num: num, //integer 是 数量
goods_spec_id: specId, //integer 是 规格ID
address_id: props.adressId, //integer 是 地址ID
fangs: defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:1是微信支付,2是余额支付
remark: '' //string 否 备注
}
const res = await getPay(params)
proxy.$methods.pay(res)
canclePop()
console.log('getPay', res)
uni.showToast({ title: '支付成功', icon: 'none' })
setTimeout(() => {
uni.navigateBack()
// console.log('getPay', res)
// uni.showToast({ title: '支付成功', icon: 'none' })
// setTimeout(() => {
// uni.navigateBack()
}, 1500);
// }, 1500);
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getPay', err)
}
}
// 购物车支付
const getCarPays = async ()=> {
}
// 购物车支付
const getCarPays = async () => {
try {
let params = {
cart_ids:props.car_Id, //string 是 购物车ID,多个英文逗号隔开
address_id:props.adressId, //integer 是 地址ID
remark:'', //string 否 备注
fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:2是余额支付
cart_ids: props.car_Id, //string 是 购物车ID,多个英文逗号隔开
address_id: props.adressId, //integer 是 地址ID
remark: '', //string 否 备注
fangs: defaultMode.value == 0 ? 1 : 2 //integer 否 支付方式:2是余额支付
}
const res = await getCarPay(params)
proxy.$methods.showTN('余额支付成功~')
... ... @@ -153,27 +155,27 @@
console.log('getCarPay', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getCarPay', err)
}
}
// 订单支付
const getOrderPays = async ()=> {
}
// 订单支付
const getOrderPays = async () => {
try {
const res = await getOrderPay(props.orderId,defaultMode.value == 0 ? 1 : 2)
const res = await getOrderPay(props.orderId, defaultMode.value == 0 ? 1 : 2)
proxy.$methods.pay(res)
canclePop()
console.log('getOrderPay', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getOrderPay', err)
}
}
}
</script>
<style lang="scss">
.popBox {
.popBox {
padding: 32rpx 24rpx 0;
.title {
... ... @@ -214,7 +216,7 @@
.go {
margin-left: 8rpx;
font-size: 24rpx;
color: #FB3E3C;
color: #fb3e3c;
line-height: 32rpx;
image {
... ... @@ -234,5 +236,5 @@
font-weight: 700;
background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
}
}
}
</style>
... ...
... ... @@ -12,14 +12,14 @@
<view class="priceBox flexJ" v-if="it.goodstatus != 3">
<text>¥{{ it.total_price }}</text>
<view class="reality flexA">
<view class="shi">实付款:</view>
<view class="shi">{{ textHandler(shop.order_status) }}</view>
<text>¥</text>
<view class="price">{{ it.total_price }}</view>
</view>
</view>
<!-- 积分商品 -->
<view class="pointsShop" v-else>
<text>需付款:</text>
<text>{{ textHandler(shop.order_status) }}</text>
<image src="/static/shopCarIc/pointsIc.png" mode=""></image>
<view class="points">{{ it.coscore }}</view>
<view class="pointsPrice">¥{{ it.diff_price }}</view>
... ... @@ -29,7 +29,7 @@
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted, nextTick } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
const props = defineProps({
shop: {
... ... @@ -37,7 +37,14 @@ const props = defineProps({
default: []
}
})
onMounted(() => {})
const textHandler = orderStatus => ([1, 11].includes(orderStatus) ? '需付款:' : [2, 3, 4, 21].includes(orderStatus) ? '实付款:' : '')
onMounted(() => {
nextTick(() => {
console.log(props.shop, '订单数据是什么')
})
})
</script>
<style lang="scss">
... ...
... ... @@ -2,92 +2,88 @@
<!-- 底部按钮弹出成 -->
<u-popup :show="payPopShow" mode="bottom" :closeable="true" round="18" @close="close" @open="open">
<view class="popBox">
<view class="title flexC">{{btnType == 0? '加入购物车' : '立即购买'}}</view>
<view class="title flexC" v-if="shopType !== 3">{{ btnType == 0 ? '加入购物车' : '立即购买' }}</view>
<view class="title flexC" v-if="shopType === 3">立即兑换</view>
<!-- 价格 -->
<view class="topBox flexA">
<view class="shopPhoto">
<image :src="shopDetail.spec[0].spec_image" mode=""></image>
</view>
<view class="price">
<view class="shopName ellipsis">{{shopDetail.name}}</view>
<view class="money">
¥{{shopDetail.spec[0].goods_price}}
</view>
<view class="shopName ellipsis">{{ shopDetail.name }}</view>
<view class="money" v-if="shopDetail.goodstatus !== 3">¥{{ shopDetail.spec[0].goods_price }}</view>
<view class="money" v-else>{{ shopDetail.spec[0].coscore }}积分</view>
</view>
</view>
<!-- 商品规格 -->
<view v-for="(item,index) in data.speList" :key="item.group_id" style="margin-bottom: 44rpx;">
<view v-for="(item, index) in data.speList" :key="item.group_id" style="margin-bottom: 44rpx">
<view class="specificationsTile">
{{item.group_name}}
{{ item.group_name }}
</view>
<view class="colorBox">
<view class="item" v-for="(it,idx) in item.spec_items" :key="it.item_id"
:class="idx == data.indexList[index].curIndex?'checked':''" @click="checkSpec(index,it,idx)">
{{it.spec_value}}
<view class="item" v-for="(it, idx) in item.spec_items" :key="it.item_id" :class="idx == data.indexList[index].curIndex ? 'checked' : ''" @click="checkSpec(index, it, idx)">
{{ it.spec_value }}
</view>
</view>
</view>
<!-- 数量加减 -->
<view class="numBox flexJ">
<view class="rightTitle flexA">
数量
</view>
<view class="rightTitle flexA">数量</view>
<view class="and flexA">
<u-number-box v-model="value" @change="valChange"></u-number-box>
</view>
</view>
<!-- 加入购物车按钮 -->
<view v-if="btnType==0" class="popBtn flexC" @click="popBtn">
加入购物车
</view>
<view v-if="btnType == 0" class="popBtn flexC" @click="popBtn">加入购物车</view>
<!-- 立即购买按钮 -->
<view v-else class="popBtn1 flexC" @click="popBtn">
{{ shopDetail.goodstatus == 3 ?'立即兑换' : '立即购买'}}
{{ shopDetail.goodstatus == 3 ? '立即兑换' : '立即购买' }}
</view>
</view>
</u-popup>
</template>
<script setup>
import { ref, reactive,onMounted } from 'vue'
import { getAddCar } from '@/api/'
let props = defineProps({
import { ref, reactive, onMounted } from 'vue'
import { getAddCar } from '@/api/'
let props = defineProps({
btnType: {
type: Number,
default: 0
},
shopType: Number,
payPopShow: {
type: Boolean,
default: false
},
shopDetail:{
shopDetail: {
type: Object,
default: {}
},
moreSpec:{
moreSpec: {
type: Object,
default: {}
}
})
let data = reactive({
value: 1,//商品数量
speList:[],//规格数组
indexList:[],//规格索引
specID:[],//选中的规格id
specIdList:[],//规格组合id数组
formList:{},//选择玩规格后的商品详情
goods_spec_id:'',//参数规格id
})
onMounted(()=> {
setTimeout(()=> {
console.log('多规格',props.moreSpec)
if(props.moreSpec != null) {
})
let data = reactive({
value: 1, //商品数量
speList: [], //规格数组
indexList: [], //规格索引
specID: [], //选中的规格id
specIdList: [], //规格组合id数组
formList: {}, //选择玩规格后的商品详情
goods_spec_id: '' //参数规格id
})
onMounted(() => {
setTimeout(() => {
console.log('多规格', props.moreSpec)
if (props.moreSpec != null) {
let spec = props.moreSpec.spec_attr //规格
let mateSpecId = props.moreSpec.spec_list //规格匹配id
data.speList = spec //渲染规格
data.specIdList = mateSpecId //组合id数组
spec.forEach((item,index)=>{
data.indexList.push({curIndex : 0})
spec.forEach((item, index) => {
data.indexList.push({ curIndex: 0 })
data.specID.push(item.spec_items[0].item_id) //默认规格id
})
data.goods_spec_id = data.specID.join('_') //默认组合规格id
... ... @@ -95,66 +91,66 @@
} else {
data.goods_spec_id = props.shopDetail.spec[0].goods_spec_id
}
},200)
})
// 关闭弹窗
let emit = defineEmits(['close'])
const close = () => {
}, 200)
})
// 关闭弹窗
let emit = defineEmits(['close'])
const close = () => {
emit('close')
}
const valChange = (e) => {
}
const valChange = e => {
console.log('数量' + e.value)
data.value = e.value
}
// 弹窗按钮props.btnType ==0加入购物车 1立即购买
const popBtn = ()=> {
}
// 弹窗按钮props.btnType ==0加入购物车 1立即购买
const popBtn = () => {
let shopType = props.shopDetail.goodstatus //商品类型 1=普通商品,2=特价商品,3=积分商品
let buyData = {id:props.shopDetail.id,num:data.value,specId:data.goods_spec_id} //购买数据参数
console.log('当前值为: ' , buyData)
props.btnType ==0 ? getAddCars() : uni.navigateTo({ url:`/pages/shopCar/confirmOrder?params=${JSON.stringify(buyData)}&shopType=${shopType}` })
}
//选择规格
const checkSpec = (index,it,idx)=> {
console.log(index,it,idx)
let buyData = { id: props.shopDetail.id, num: data.value, specId: data.goods_spec_id } //购买数据参数
console.log('当前值为: ', buyData)
props.btnType == 0 ? getAddCars() : uni.navigateTo({ url: `/pages/shopCar/confirmOrder?params=${JSON.stringify(buyData)}&shopType=${shopType}` })
}
//选择规格
const checkSpec = (index, it, idx) => {
console.log(index, it, idx)
data.indexList[index].curIndex = idx //选中高亮
if(data.speList.length==1) {
data.specID.splice(index,1,it.item_id)
if (data.speList.length == 1) {
data.specID.splice(index, 1, it.item_id)
} else {
data.specID.splice(index,data.specID.length>1?1:0,it.item_id)//规格组合的id
data.specID.splice(index, data.specID.length > 1 ? 1 : 0, it.item_id) //规格组合的id
}
makeUpId()
}
// 组合id
const makeUpId = ()=> {
if(data.specID.length == data.speList.length) {
let str = data.specIdList.find(item=> item.spec_sku_id == data.specID.join('_'))
}
// 组合id
const makeUpId = () => {
if (data.specID.length == data.speList.length) {
let str = data.specIdList.find(item => item.spec_sku_id == data.specID.join('_'))
data.formList = str.form //所选规格对应详情
data.goods_spec_id = str.goods_spec_id //商品规格详情id
console.log('查找到的规格',str,data.specID.join('_'))
console.log('查找到的规格', str, data.specID.join('_'))
}
}
// 加入购物车
const getAddCars = async ()=>{
}
// 加入购物车
const getAddCars = async () => {
try {
let params = {
goods_id:props.shopDetail.id, //integer 是 商品ID
num:data.value, //integer //是 数量
goods_spec_id:data.goods_spec_id //integer 是 规格ID
goods_id: props.shopDetail.id, //integer 是 商品ID
num: data.value, //integer //是 数量
goods_spec_id: data.goods_spec_id //integer 是 规格ID
}
const res = await getAddCar(params)
close()
uni.showToast({ title:'成功加入购物车~',icon:'none' })
uni.showToast({ title: '成功加入购物车~', icon: 'none' })
console.log('getAddCar', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getAddCar', err)
}
}
}
</script>
<style lang="scss">
.popBox {
.popBox {
padding: 32rpx 24rpx 0;
.title {
... ... @@ -259,13 +255,13 @@
}
.yue {
color: #F33F2E;
color: #f33f2e;
font-size: 30rpx;
font-weight: 700;
text {
margin-top: 5rpx;
color: #F33F2E;
color: #f33f2e;
font-size: 24rpx;
}
}
... ... @@ -297,5 +293,5 @@
.notHave {
background: #ffd5d1ff;
}
}
}
</style>
... ...
... ... @@ -11,6 +11,7 @@
<view class="shopPrice flexA" v-if="!pointShop">
<view class="new">¥{{ item.goods_price || item.spprice }}</view>
<view class="original" v-if="shopHeight == 322">¥{{ item.line_price }}</view>
<view class="original" v-if="isClass">¥{{ item.spyprice }}</view>
</view>
<view class="points" v-else>
<image src="/static/shopCarIc/pointsIc.png" mode=""></image>
... ... @@ -41,7 +42,8 @@ const props = defineProps({
list: {
type: Array,
default: []
}
},
isClass: Boolean
})
const wide = ref(props.shopWidth + 'rpx')
const heig = ref(props.shopHeight + 'rpx')
... ...
... ... @@ -31,6 +31,12 @@
}
},
{
"path": "pages/index/bargainPrice",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/class/class",
"style": {
"navigationBarTitleText": "",
... ...
<template>
<search @doSearchs="doSearchs" @input="input" :keyWord="keyWord" :disabled="false"></search>
<search></search>
<view class="mainBox">
<shops :list="shopList" :shopWidth="344" :shopHeight="344" />
<shops :list="shopList" :shopWidth="344" :shopHeight="344" :isClass="true" />
</view>
<view class="null flexV" v-if="!shopList.length">
<image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image>
... ... @@ -23,16 +23,6 @@ onLoad(async ({ pid }) => {
shopList.value = res
console.log(res, '分类商品列表')
})
const keyWord = ref('')
const doSearchs = () => {}
const input = e => {
if (e.detail.value == '') {
emit('input', e.detail.value)
}
}
</script>
<style lang="scss">
... ...
<template>
<view>
<u-navbar bgColor="#F6F8FA" title="特价专区" :placeholder="true" autoBack></u-navbar>
<view>
<search />
<view class="mainBox">
<shops :list="shopList" :shopWidth="344" :shopHeight="344" :pointShop="false" />
</view>
</view>
<view class="null flexV" v-if="!shopList.length">
<image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image>
<text>暂无商品信息</text>
</view>
</view>
</template>
<script setup>
import { ref, reactive } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import search from '@/componets/searchBox.vue'
import shops from '@/componets/shops.vue'
import { getIndex } from '@/api/'
onShow(() => {
getIndexs()
})
let shopList = ref([]) // 积分商品
const getIndexs = async () => {
try {
const res = await getIndex()
shopList.value = res.tjgoods //特价商品
// 保存数据
} catch (err) {
uni.showToast({ title: err, icon: 'none' })
console.log('getIndex', err)
}
}
</script>
<style lang="scss">
page {
background: #f6f8fa;
}
.mainBox {
width: 100%;
padding: 16rpx 24rpx;
box-sizing: border-box;
}
.null {
margin-top: 266rpx;
text {
position: relative;
margin-top: -80rpx;
color: #00000066;
font-size: 26rpx;
}
image {
width: 348rpx;
height: 348rpx;
}
}
</style>
... ...
... ... @@ -32,9 +32,9 @@
<view class="topBox flexJ">
<view class="titles">
<view class="title">特价专区</view>
<text>JiangChengYuanTi</text>
<text>Special price zone</text>
</view>
<view class="more flexA">
<view class="more flexA" @click="toBargainPriceMoreHandler">
更多
<image src="/static/indexIc/orangeRight.png" mode=""></image>
</view>
... ... @@ -58,11 +58,18 @@
<script setup>
import { ref, reactive } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { onShow, onLoad, onReachBottom } from '@dcloudio/uni-app'
import search from '@/componets/searchBox.vue'
import shops from '@/componets/shops.vue'
import { getIndex } from '@/api/'
const lastPage = ref(1)
const curPage = ref(1)
onShow(() => {
curPage.value = 1
data.recommendList.splice(0)
getIndexs()
})
// 跳转充值中心
... ... @@ -83,19 +90,30 @@ const jumpClass = item => {
}
const jumpClassHandler = () => uni.switchTab({ url: '/pages/class/class' })
const toBargainPriceMoreHandler = () => uni.navigateTo({ url: '/pages/index/bargainPrice' })
const getIndexs = async () => {
try {
const res = await getIndex()
const res = await getIndex({ page: curPage.value })
data.classList = res.fenlei //分类
data.specialList = res.tjgoods //特价商品
data.recommendList = res.goods //推荐商品
data.recommendList = data.recommendList.concat(res.goods.data) //推荐商品
console.log(data.recommendList, '推荐商品')
console.log('getIndex', res)
lastPage.value = res.goods.last_page
// 保存数据
} catch (err) {
uni.showToast({ title: err, icon: 'none' })
console.log('getIndex', err)
}
}
onReachBottom(() => {
curPage.value++
if (curPage.value >= lastPage.value) return
getIndex()
})
</script>
<style lang="scss">
... ...
... ... @@ -10,10 +10,9 @@
</u-navbar>
<!-- 轮播图 -->
<view class="swiperBox">
<u-swiper height="375" :list="swiperList" @change="e => currentNum = e.current" :autoplay="false"
indicatorStyle="right: 20px">
<template #indicator >
<view class="indicator-num" v-if="shopType!=3">
<u-swiper height="375" :list="swiperList" @change="e => (currentNum = e.current)" :autoplay="false" indicatorStyle="right: 20px">
<template #indicator>
<view class="indicator-num" v-if="shopType != 3">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
</view>
</template>
... ... @@ -24,17 +23,17 @@
<shopInfo :info="detaileList"></shopInfo>
</view>
<view class="line"></view>
<view class="mainBox" >
<view class="mainBox">
<!-- 1=普通商品,2=特价商品,3=积分商品 -->
<view v-if="shopType==1" >
<view class="commentNmu flexJ" >
<text>评论({{commentList.length}})</text>
<view class="see flexA" v-if="commentList.length>0" @click="seeAll">
<view v-if="shopType == 1">
<view class="commentNmu flexJ">
<text>评论({{ commentList.length }})</text>
<view class="see flexA" v-if="commentList.length > 0" @click="seeAll">
查看全部
<image src="/static/indexIc/orangeRight.png" mode=""></image>
</view>
</view>
<view v-if="commentList.length>0">
<view v-if="commentList.length > 0">
<comment :commentList="commentList"></comment>
</view>
<!-- 暂无评论 -->
... ... @@ -43,101 +42,99 @@
暂无评论
</view>
</view>
<view v-if="shopType!==3">
<view v-if="shopType !== 3">
<view class="line"></view>
<view class="titles">商品详情</view>
<rich-text :nodes="detaileList.content"></rich-text>
</view>
</view>
<view class="lineBox flexC" v-if="shopType==3">
<view class="lineBox flexC" v-if="shopType == 3">
<view class="lines"></view>
<text>商品详情</text>
<view class="lines"></view>
</view>
<view class="" style="height: 300rpx;"></view>
<view class="" style="height: 300rpx"></view>
<!-- 底部按钮 -->
<view class="btnBox iosAuto flexJ">
<view class="left flexA">
<view class="leftIc flexV" v-for="(item,index) in icList" :key="item.id" @click="btns(index)">
<view class="leftIc flexV" v-for="(item, index) in icList" :key="item.id" @click="btns(index)">
<view class="images">
<image :src="item.icon" mode=""></image>
<u-badge :absolute="true" v-if="index==2" :offset="[-6, -6]" color="#fff" bgColor="#F63D3A" max="99" :value="value"></u-badge>
<u-badge :absolute="true" v-if="index == 2" :offset="[-6, -6]" color="#fff" bgColor="#F63D3A" max="99" :value="value"></u-badge>
</view>
<text v-if="index!=1">{{item.name}}</text>
<button v-if="index==1" open-type="contact">{{item.name}}</button>
<text v-if="index != 1">{{ item.name }}</text>
<button v-if="index == 1" open-type="contact">{{ item.name }}</button>
</view>
</view>
<view class="flexA" v-if="shopType!=3">
<view class="flexA" v-if="shopType != 3">
<view class="add flexC" @click="toOrder(0)">加入购物车</view>
<view class="buy flexC" @click="toOrder(1)">立即购买</view>
</view>
<view v-else class="exchange flexC" @click="toOrder(3)">我要兑换</view>
</view>
<popPay :moreSpec="moreSpec" :shopDetail="detaileList" @close="payPopShow = false" :btnType="btnType" :payPopShow="payPopShow"></popPay>
<popPay :moreSpec="moreSpec" :shopDetail="detaileList" @close="payPopShow = false" :shopType="shopType" :btnType="btnType" :payPopShow="payPopShow"></popPay>
</view>
</template>
<script setup>
import {ref,reactive} from 'vue'
import {onShow,onLoad,onHide} from '@dcloudio/uni-app'
import shopInfo from '@/componets/shopInfo.vue'
import comment from '@/componets/comment.vue'
import popPay from '@/componets/popPay.vue'
import { getShopDetaile } from '@/api/'
onLoad((e)=> {
console.log('商品id',e.id)
import { ref, reactive } from 'vue'
import { onShow, onLoad, onHide } from '@dcloudio/uni-app'
import shopInfo from '@/componets/shopInfo.vue'
import comment from '@/componets/comment.vue'
import popPay from '@/componets/popPay.vue'
import { getShopDetaile } from '@/api/'
onLoad(e => {
console.log('商品id', e.id)
getShopDetailes(e.id)
})
onHide(()=>{
})
onHide(() => {
payPopShow.value = false
})
const currentNum = ref(0)
const list6 = reactive([
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
])
const icList = reactive([{id:1,name:'店铺',icon:'/static/indexIc/shopIc.png'},
{id:2,name:'客服',icon:'/static/indexIc/service.png'},
{id:3,name:'购物车',icon:'/static/tabbarsIc/shopCar.png'}])
const value = ref('1') // 购物车徽章数
//查看全部评论
const seeAll = ()=>{
})
const currentNum = ref(0)
const list6 = reactive(['https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://cdn.uviewui.com/uview/swiper/swiper1.png'])
const icList = reactive([
{ id: 1, name: '店铺', icon: '/static/indexIc/shopIc.png' },
{ id: 2, name: '客服', icon: '/static/indexIc/service.png' },
{ id: 3, name: '购物车', icon: '/static/tabbarsIc/shopCar.png' }
])
const value = ref('1') // 购物车徽章数
//查看全部评论
const seeAll = () => {
uni.navigateTo({
url:'/pages/index/allComment'
url: '/pages/index/allComment'
})
}
let btnType = ref(0) //按钮状态 0加入购物车 1立即购买
let payPopShow = ref(false) //按钮状态 0加入购物车 1立即购买
// 立即购买
const toOrder = (type)=> {
}
let btnType = ref(0) //按钮状态 0加入购物车 1立即购买
let payPopShow = ref(false) //按钮状态 0加入购物车 1立即购买
// 立即购买
const toOrder = type => {
// if( type==3 ) return uni.navigateTo({url:`/pages/shopCar/confirmOrder?shopType=${shopType.value}`})
btnType.value = type
payPopShow.value = true
}
// 底部按钮
const btns = (index)=>{
}
// 底部按钮
const btns = index => {
switch (index) {
case 0:
console.log('店铺')
uni.switchTab({ url:'/pages/index/index'})
break;
uni.switchTab({ url: '/pages/index/index' })
break
case 2:
console.log('购物车')
uni.switchTab({ url:'/pages/shopCar/shopCar'})
break;
uni.switchTab({ url: '/pages/shopCar/shopCar' })
break
default:
break;
}
}
let detaileList = ref({}) //商品详情
let specList = ref({}) //默认规格第一项
let swiperList = ref([]) //轮播图
let commentList = ref([]) //评论
let moreSpec = ref({}) //多规格
let shopType = ref(1) //商品类型
// 获取详情
const getShopDetailes = async (id)=>{
break
}
}
let detaileList = ref({}) //商品详情
let specList = ref({}) //默认规格第一项
let swiperList = ref([]) //轮播图
let commentList = ref([]) //评论
let moreSpec = ref({}) //多规格
let shopType = ref(1) //商品类型
// 获取详情
const getShopDetailes = async id => {
try {
const res = await getShopDetaile(id)
detaileList.value = res.detail //详情
... ... @@ -150,20 +147,20 @@
console.log('getShopDetaile', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('', err)
}
}
}
</script>
<style lang="scss">
.u-nav-slot {
.u-nav-slot {
image {
width: 48rpx;
height: 48rpx;
}
}
.indicator-num {
}
.indicator-num {
padding: 2px 0;
background-color: rgba(0, 0, 0, 0.35);
border-radius: 100px;
... ... @@ -172,26 +169,26 @@
justify-content: center;
&__text {
color: #FFFFFF;
color: #ffffff;
font-size: 12px;
}
}
}
.swiperBox {
.swiperBox {
margin-bottom: 32rpx;
}
.info {
}
.info {
width: 702rpx;
margin: 0 auto;
}
.line {
}
.line {
width: 100%;
height: 6rpx;
opacity: 1;
background: #f7f8faff;
margin: 32rpx 0;
}
.mainBox {
}
.mainBox {
padding: 0 24rpx;
.commentNmu {
... ... @@ -225,14 +222,14 @@
margin-bottom: 16rpx;
}
}
}
.titles {
}
.titles {
color: #1a1a1aff;
font-size: 28rpx;
font-weight: 700;
}
}
.lineBox {
.lineBox {
margin: 24rpx 0 30rpx;
.lines {
... ... @@ -248,9 +245,9 @@
color: #969799ff;
font-size: 24rpx;
}
}
}
.btnBox {
.btnBox {
position: fixed;
left: 0;
bottom: 0;
... ... @@ -299,7 +296,7 @@
}
}
.buy{
.buy {
margin-right: 32rpx;
width: 200rpx;
height: 80rpx;
... ... @@ -330,5 +327,5 @@
font-weight: 700;
background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
}
}
}
</style>
... ...
... ... @@ -5,7 +5,7 @@
<view class="boxs">
<view class="title">上传图片</view>
<view class="photoBox">
<view class="itemPhoto" v-for="(item,index) in photoList" :key="index">
<view class="itemPhoto" v-for="(item, index) in photoList" :key="index">
<image class="photo" :src="item" mode=""></image>
<view class="delBox flexC" @click="delPhoto(index)">
<image class="del" src="/static/mineIc/close.png" mode=""></image>
... ... @@ -13,7 +13,7 @@
</view>
<view class="addPhoto flexV" @click="addPhoto">
<image src="/static/mineIc/addIC.png" mode=""></image>
还可添加{{5 - photoList.length}}张
还可添加{{ 5 - photoList.length }}张
</view>
</view>
<view class="desc">
... ... @@ -25,60 +25,61 @@
</view>
</view>
<view class="btnBox iosAuto">
<view class="btn flexC" @click="submit"> 提交评论 </view>
<view class="btn flexC" @click="submit">提交评论</view>
</view>
</view>
</template>
<script setup>
import { ref,reactive,getCurrentInstance} from 'vue'
import {onShow,onLoad} from '@dcloudio/uni-app'
import { getComment } from '@/api/'
const count = ref(5) //最高可选星星数
const value = ref(0) //星星选中数
let photoList = reactive([]) //图片
let desc = ref('') //评论
const { proxy } = getCurrentInstance() //获取当前实例
// 提交评论
const submit = ()=> {
import { ref, reactive, getCurrentInstance } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getComment } from '@/api/'
const count = ref(5) //最高可选星星数
const value = ref(0) //星星选中数
let photoList = reactive([]) //图片
let desc = ref('') //评论
const { proxy } = getCurrentInstance() //获取当前实例
// 提交评论
const submit = () => {
getComments()
}
// 上传图片
const addPhoto = ()=> proxy.$methods.upload('http://healthmall.shs.broing.cn/api/common/upload',(imgUrl) => {
console.log('返回图片',imgUrl)
}
// 上传图片
const addPhoto = () =>
proxy.$methods.upload('http://health.shs.broing.cn/api/common/upload', imgUrl => {
console.log('返回图片', imgUrl)
photoList.push(imgUrl.avatar)
})
// 删除图片
const delPhoto = (index)=> {
photoList.splice(index,1)
}
// 写评论
const getComments = async ()=> {
// 删除图片
const delPhoto = index => {
photoList.splice(index, 1)
}
// 写评论
const getComments = async () => {
try {
let params = {
goods_id:86, //integer 否 商品id
image:photoList.join(','), //string 是 图片
content:desc.value //integer 否 内容
goods_id: 86, //integer 否 商品id
image: photoList.join(','), //string 是 图片
content: desc.value //integer 否 内容
}
const res = await getComment(params)
uni.showToast({ title:'感谢您的评论~',icon:'none' })
setTimeout(()=> {
uni.showToast({ title: '感谢您的评论~', icon: 'none' })
setTimeout(() => {
uni.navigateBack()
},1000)
}, 1000)
console.log('getComment', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getComment', err)
}
}
}
</script>
<style lang="scss">
page {
page {
background: #f0f2f5ff;
}
.boxs {
}
.boxs {
width: 702rpx;
margin: 34rpx auto;
border-radius: 16rpx;
... ... @@ -115,7 +116,7 @@
top: 0;
width: 24rpx;
height: 24rpx;
background: #484B46;
background: #484b46;
border-radius: 0 8rpx 0 8rpx;
.del {
... ... @@ -167,12 +168,12 @@
margin-right: 20rpx;
}
}
}
}
.btnBox {
.btnBox {
position: fixed;
left: 0;
bottom:0;
bottom: 0;
width: 100%;
.btn {
... ... @@ -185,5 +186,5 @@
font-weight: 700;
background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
}
}
}
</style>
... ...
... ... @@ -21,8 +21,8 @@
<u-count-down :time="item.time * 1000" format="mm:ss"></u-count-down>
</view>
<view class="orderNoBox flexJ" v-if="[3, 4, 21].includes(item.order_status)">
<view class="orderNo">快递单号 {{ item.order_no }}</view>
<view @click.stop="copy(item.order_no)" class="copy">复制</view>
<view class="orderNo">快递单号 {{ item.express_no }}</view>
<view @click.stop="copy(item.express_no)" class="copy">复制</view>
</view>
<!-- 订单商品 -->
<orderShop :shop="item"></orderShop>
... ... @@ -31,7 +31,9 @@
<!-- 待付款 -->
<view class="flexA" v-if="item.order_status == 1">
<view @click.stop="operateOrder(item, 0)" class="cancel flexC">{{ item.goodstatus_text == '' ? '取消付款' : '取消兑换' }}</view>
<view @click.stop="operateOrder(item, 1)" v-if="item.order_status == 1" class="orange flexC">{{ item.goodstatus_text == '' ? '立即支付' : '立即兑换' }}</view>
<view @click.stop="operateOrder(item, 1)" v-if="item.order_status == 1" class="orange flexC">
{{ item.goodstatus_text == '' ? '立即支付' : '立即兑换' }}
</view>
</view>
<!-- 代发货 -->
<view @click.stop="operateOrder(item, 2)" v-if="item.order_status == 2" class="orange flexC">申请退款</view>
... ... @@ -44,7 +46,7 @@
<view @click.stop="operateOrder(item, 3)" class="orange flexC">确认收货</view>
</view>
<!-- 待评价 -->
<view @click.stop="operateOrder(item, 4)" v-if="item.order_status == 4 && item.goodstatus_text != 3" class="orange flexC">评价</view>
<view @click.stop="operateOrder(item, 4)" v-if="item.order_status == 4" class="orange flexC">评价</view>
<!-- 售后 -->
<view @click.stop="operateOrder(item, 5)" v-if="item.order_status == 21" class="orange flexC">查看详情</view>
</view>
... ... @@ -79,26 +81,7 @@ onShow(() => {
})
let tabStatus = ref(0) //订单状态
let orderList = ref([]) //订单
const list1 = reactive([
{
name: '全部'
},
{
name: '待付款'
},
{
name: '待发货'
},
{
name: '待收货'
},
{
name: '待评价'
},
{
name: '售后'
}
])
const list1 = reactive([{ name: '全部' }, { name: '待付款' }, { name: '待发货' }, { name: '待收货' }, { name: '待评价' }, { name: '售后' }])
// type == 0取消订单 1立即支付 2申请退款 3确认收货 4评价 5查看详情
const operateOrder = (item, type) => {
orderId.value = item.id
... ...
<template>
<view>
<u-navbar bgColor="transparent" :placeholder="true" @leftClick="leftClickHandler"> </u-navbar>
<u-navbar bgColor="transparent" :placeholder="true" @leftClick="leftClickHandler"></u-navbar>
<view class="mainBox">
<!-- 收货地址 -->
<shopAddres :isOrder="true" :adress="orderList"></shopAddres>
... ... @@ -8,28 +8,42 @@
<orderShops :shop="orderList"></orderShops>
<view class="line"></view>
<view class="mode flexJ">
<view class="left">提货方式</view>
<view class="left">配送方式</view>
<view class="right">快递配送</view>
</view>
</view>
<view class="moneyBox flexJ" style="margin-bottom: 20rpx;">
<view class="moneyBox flexJ" style="margin-bottom: 20rpx" v-if="orderList.goodstatus_text !== 3">
<view>实付款</view>
<view class="money">¥{{orderList.total_price}}</view>
<view class="money">¥{{ orderList.total_price }}</view>
</view>
<view class="moneyBox flexJ" v-for="(item,index) in placeOrder" :key="item.id">
<view class="items" >
{{item.name}} <text>{{item.text}}</text>
<template v-if="orderList.goodstatus_text === 3">
<view class="moneyBox flexJ" style="margin-bottom: 20rpx">
<view>运费</view>
<view class="money">¥{{ orderList.express_price }}</view>
</view>
<view v-if="index ==0 " @click="copy" class="copy">复制</view>
<view class="moneyBox flexJ" style="margin-bottom: 20rpx">
<view>实付</view>
<view class="money">
<text style="color: #000">{{ orderList.score }}积分</text>
+¥{{ orderList.express_price }}
</view>
</view>
</template>
<view class="moneyBox flexJ" v-for="(item, index) in placeOrder" :key="item.id">
<view class="items">
{{ item.name }}
<text>{{ item.text }}</text>
</view>
<view v-if="index == 0" @click="copy" class="copy">复制</view>
</view>
</view>
<!-- 按钮 // 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后-->
<view class="btnBox iosAuto">
<view v-if="btnType==3" class="service flexC">
<view v-if="btnType == 3" class="service flexC">
<button open-type="contact">联系客服</button>
</view>
<view v-if="btnType<=2" class="gay flexC" @click="btns(0)">{{btnType==1?'取消付款' : btnType==2?'申请退款': '联系客服'}}</view>
<view v-if="btnType==1 || btnType==3" class="red flexC" @click="btns(1)">{{btnType==1?'立即支付' : '确认收货'}}</view>
<view v-if="btnType <= 2" class="gay flexC" @click="btns(0)">{{ btnType == 1 ? '取消付款' : btnType == 2 ? '申请退款' : '联系客服' }}</view>
<view v-if="btnType == 1 || btnType == 3" class="red flexC" @click="btns(1)">{{ btnType == 1 ? '立即支付' : '确认收货' }}</view>
</view>
<!-- 选择支付方式 -->
<payMode @canclePop="modeShow = false" :orderId="orderId" :isOrderPay="true" :totalPrice="orderList.total_price" :modeShow="modeShow"></payMode>
... ... @@ -39,130 +53,132 @@
</template>
<script setup>
import { ref,reactive, getCurrentInstance } from 'vue'
import {onShow,onLoad} from '@dcloudio/uni-app'
import shopAddres from '@/componets/address.vue'
import orderShops from '@/componets/orderShop.vue'
import tipPops from '@/componets/tipPop.vue'
import PayMode from '@/componets/checkPayMode.vue'
import { getOrderdetail,getCancleOrder,getRefund,getReceipt } from '@/api/'
onLoad((e)=>{
import { ref, reactive, getCurrentInstance } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import shopAddres from '@/componets/address.vue'
import orderShops from '@/componets/orderShop.vue'
import tipPops from '@/componets/tipPop.vue'
import PayMode from '@/componets/checkPayMode.vue'
import { getOrderdetail, getCancleOrder, getRefund, getReceipt } from '@/api/'
onLoad(e => {
console.log(e.id)
orderId.value = e.id
getOrderdetails(e.id)
})
let tipShow = ref(false) //是否取消订单弹窗
let orderList = ref({}) //订单
let modeShow = ref(false) //选择支付方式
let orderId = ref('')//订单id
let btnType = ref(1) //按钮状态
let integral = ref(0) //积分
let tipType = ref(1) //1取消支付 2取消订单
let placeOrder = ref([{id:1,name:'订单编号',text:'1212'},
{id:2,name:'支付方式',text:'1212'},
{id:3,name:'下单时间',text:'1212'},
{id:4,name:'快递编号',text:'1212'}])
})
let tipShow = ref(false) //是否取消订单弹窗
let orderList = ref({}) //订单
let modeShow = ref(false) //选择支付方式
let orderId = ref('') //订单id
let btnType = ref(1) //按钮状态
let integral = ref(0) //积分
let tipType = ref(1) //1取消支付 2取消订单
let placeOrder = ref([
{ id: 1, name: '订单编号', text: '1212' },
{ id: 2, name: '支付方式', text: '1212' },
{ id: 3, name: '下单时间', text: '1212' },
{ id: 4, name: '快递编号', text: '1212' }
])
const leftClickHandler = () => {
const leftClickHandler = () => {
// const pages = getCurrentPages()
// const page = pages[pages.length - 2]
// page.onLoad({ status: 0 })
uni.navigateBack({ delta: 1 })
}
}
// 复制订单号
const copy = ()=> {
// 复制订单号
const copy = () => {
uni.setClipboardData({
data: orderList.value.order_no,
data: orderList.value.express_no,
success: () => {
uni.showToast({ title: "复制成功",icon:'none' })
uni.showToast({ title: '复制成功', icon: 'none' })
}
})
}
// 立即支付 type==0灰色按钮 否者橙色按钮
// 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后 getCancleOrders()
const btns = (type)=> {
if(type==0) {
}
// 立即支付 type==0灰色按钮 否者橙色按钮
// 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,11=已取消,21=售后 getCancleOrders()
const btns = type => {
if (type == 0) {
tipType.value = btnType.value == 1 ? 1 : 2
tipShow.value = true
// btnType.value == 1 ? tipShow.value = true : getRefunds()
} else {
btnType.value == 1 ? modeShow.value = true : getReceipts()
btnType.value == 1 ? (modeShow.value = true) : getReceipts()
// btnType.value == 3 ? getReceipts() :''
}
}
//提示弹窗按钮点击
const pointsBtns = (type)=> {
}
//提示弹窗按钮点击
const pointsBtns = type => {
console.log(type)
tipShow.value = false
if(type == 1) {
if (type == 1) {
tipType.value == 1 ? getCancleOrders() : getRefunds()
}
}
const { proxy } = getCurrentInstance() //获取当前实例
// 订单详情
const getOrderdetails = async (id)=>{
}
const { proxy } = getCurrentInstance() //获取当前实例
// 订单详情
const getOrderdetails = async id => {
try {
const res = await getOrderdetail(id)
orderList.value = res
btnType.value = res.order_status
placeOrder.value[0].text = res.order_no
placeOrder.value[1].text = res.zhifu == 1? '微信' : '余额'
placeOrder.value[1].text = res.zhifu == 1 ? '微信' : '余额'
placeOrder.value[2].text = res.createtime
placeOrder.value[3].text = res.pay_order_no
placeOrder.value[3].text = res.express_no
console.log('getOrderdetail', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getOrderdetail', err)
}
}
// 取消订单
const getCancleOrders = async ()=> {
}
// 取消订单
const getCancleOrders = async () => {
try {
const res = await getCancleOrder(orderId.value)
proxy.$methods.showTN('订单已取消~')
console.log('getCancleOrder', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getCancleOrder', err)
}
}
// 退款
const getRefunds = async ()=>{
}
// 退款
const getRefunds = async () => {
try {
const res = await getRefund(orderId.value)
proxy.$methods.showTN('已申请,等待客服审核')
console.log('getRefund', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getRefund', err)
}
}
// 确认收货
const getReceipts = async ()=>{
}
// 确认收货
const getReceipts = async () => {
try {
const res = await getReceipt(orderId.value)
proxy.$methods.showTN('已收货,期待下次下单~')
console.log('getReceipt', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getReceipt', err)
}
}
}
</script>
<style lang="scss">
page {
page {
background: #f7f8faff;
}
}
.mainBox {
.mainBox {
width: 100%;
padding:20rpx 24rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
.shopBox {
... ... @@ -197,7 +213,7 @@
width: 100%;
padding: 32rpx 20rpx;
box-sizing: border-box;
margin: 0 auto ;
margin: 0 auto;
border-radius: 24rpx;
background: #ffffffff;
... ... @@ -229,9 +245,9 @@
font-size: 26rpx;
}
}
}
}
.btnBox {
.btnBox {
position: fixed;
left: 0;
bottom: 0;
... ... @@ -285,5 +301,5 @@
font-weight: 700;
background: linear-gradient(-88deg, #fe6434ff 0%, #ff2f2fff 100%);
}
}
}
</style>
... ...
... ... @@ -10,7 +10,7 @@
<view class="tip">余额(元)</view>
<view class="balance flexA">
<text>¥</text>
<view class="balances">{{balance}}</view>
<view class="balances">{{ balance }}</view>
</view>
</view>
<view class="photo flexA">
... ... @@ -19,24 +19,23 @@
<open-data type="userAvatarUrl" class="avatar"></open-data>
<open-data type="userNickName" class="nickname"></open-data>
</view>
</view>
</view>
</view>
<view class="packageBox">
<view class="title flexA">金额
<input type="number" v-model="money" placeholder-class="ples" placeholder="(自定义)">
<view class="title flexA">
金额
<input type="number" v-model="money" placeholder-class="ples" placeholder="(自定义)" />
</view>
<view class="package">
<view class="item flexV" @click="checkPackage(item,index)" :class="cur == index ? 'check' : '' "
v-for="(item,index) in packageList" :key="item.id">
<view class="recharge">冲{{item.money}}</view>
<view class="deliver">送{{item.discount}}</view>
<view class="item flexV" @click="checkPackage(item, index)" :class="cur == index ? 'check' : ''" v-for="(item, index) in packageList" :key="item.id">
<view class="recharge">冲{{ item.money }}</view>
<view class="deliver">送{{ item.discount }}</view>
</view>
</view>
</view>
<view class="line"> </view>
<view class="line"></view>
<view class="desc">
<view class="descTitle">使用说明</view>
</view>
... ... @@ -47,76 +46,76 @@
</template>
<script setup>
import { ref, reactive, getCurrentInstance } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getPackage,getRecharge,getyue } from '@/api/'
onShow(()=> {
import { ref, reactive, getCurrentInstance } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getPackage, getRecharge, getyue } from '@/api/'
onShow(() => {
getPackages() //充值套餐
getyues() //我的余额
})
let packageList = ref([]) //套餐数组
let money = ref('') //自定义金额
let cur = ref(0) //当前选择套餐
let balance = ref(0) //余额
const checkPackage = (item, index) => {
})
let packageList = ref([]) //套餐数组
let money = ref('') //自定义金额
let cur = ref(0) //当前选择套餐
let balance = ref(0) //余额
const checkPackage = (item, index) => {
cur.value = index
}
// 立即支付按钮
const rechargeBtn = ()=> {
}
// 立即支付按钮
const rechargeBtn = () => {
let packageMoney = packageList.value[cur.value].money
getRecharges( money.value== '' ? packageMoney : money.value)
}
const { proxy } = getCurrentInstance()
// 充值
const getRecharges = async (money)=>{
getRecharges(money.value == '' ? packageMoney : money.value)
}
const { proxy } = getCurrentInstance()
// 充值
const getRecharges = async money => {
try {
const res = await getRecharge(money)
proxy.$methods.pay(res)
console.log('getRecharge', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getRecharge', err)
}
}
// 充值套餐
const getPackages = async ()=>{
}
// 充值套餐
const getPackages = async () => {
try {
const res = await getPackage()
packageList.value = res
console.log('getPackage', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getPackage', err)
}
}
// 我的余额
const getyues = async ()=> {
}
// 我的余额
const getyues = async () => {
try {
const res = await getyue()
balance.value = res.money
uni.setStorageSync('balance',res.money)
uni.setStorageSync('balance', res.money)
console.log('getyue', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getyue', err)
}
}
}
</script>
<style lang="scss">
.u-navbar__content__title {
.u-navbar__content__title {
color: #fff !important;
font-size: 32rpx;
font-weight: 700;
}
}
.blackBg {
.blackBg {
width: 100%;
height: 278rpx;
background: #1D1E24;
background: #1d1e24;
padding: 32rpx 24rpx 0;
box-sizing: border-box;
... ... @@ -140,7 +139,6 @@
box-sizing: border-box;
.balanceBox {
.tip {
margin-top: 96rpx;
color: #000000ff;
... ... @@ -177,9 +175,9 @@
}
}
}
}
}
.packageBox {
.packageBox {
position: relative;
width: 100%;
opacity: 1;
... ... @@ -216,7 +214,6 @@
border-radius: 24rpx;
border: 2rpx solid #f9f9f9ff;
.recharge {
color: #361e0dff;
font-size: 40rpx;
... ... @@ -238,15 +235,15 @@
background: #fdf8eeff !important;
}
}
}
}
.line {
.line {
width: 100%;
height: 24rpx;
background: #F5F7FB;
}
background: #f5f7fb;
}
.desc {
.desc {
width: 100%;
padding: 24rpx 20rpx;
box-sizing: border-box;
... ... @@ -258,9 +255,9 @@
font-weight: 700;
margin-bottom: 24rpx;
}
}
}
.btnBox {
.btnBox {
position: fixed;
left: 0;
bottom: 0;
... ... @@ -277,5 +274,5 @@
font-weight: 700;
background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
}
}
}
</style>
... ...
... ... @@ -2,18 +2,18 @@
<!-- 购物车 -->
<view class="">
<u-navbar bgColor="#F6F8FA" :placeholder="true" title="购物车" :autoBack="true"></u-navbar>
<view class="minBox" v-if="data.shopList.length>0">
<view class="minBox" v-if="data.shopList.length > 0">
<!-- 商品管理 -->
<view class="topBox flexJ" >
<view class="topBox flexJ">
<view class="amount flexA" @click="toMyAddress">
<image src="/static/shopCarIc/shopAddress.png" mode=""></image>
<view class="adress ellipsis">{{data.adress}}</view>
<view class="adress ellipsis">{{ data.adress }}</view>
</view>
<view class="manage" @click="changingOver">{{data.btnStatus ? '管理' : '完成' }}</view>
<view class="manage" @click="changingOver">{{ data.btnStatus ? '管理' : '完成' }}</view>
</view>
<!-- 商品 -->
<view class="shopBox flexA" v-for="(item,index) in data.shopList" :key="item.id">
<view class="shopBox flexA" v-for="(item, index) in data.shopList" :key="item.id">
<!-- 选择 -->
<view class="checkIc" @click.stop="checkShop(index)">
<image v-if="!item.checkType" src="/static/shopCarIc/checks.png" mode=""></image>
... ... @@ -22,26 +22,27 @@
<!-- 商品图片 -->
<view class="shopPhoto">
<image :src="item.image" mode=""></image>
<image v-if="item.status==0" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image>
<image v-if="item.status == 0" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image>
</view>
<!-- 商品详细 -->
<view class="infoBox">
<!-- 商品名称 -->
<view class="title ellipsis">{{item.name}}</view>
<view class="title ellipsis">{{ item.name }}</view>
<!-- 商品数量加减 -->
<view class="numBox flexJ">
<view class="rightTitle flexA">
<text>¥</text>{{item.goods_price}}
<text>¥</text>
{{ item.goods_price }}
</view>
<view class="and flexA">
<image src="/static/shopCarIc/reduce.png" mode="" @click="numBtn(0,item)"></image>
<view class="num flexC">{{item.total_num}}</view>
<image src="/static/shopCarIc/add.png" mode="" @click="numBtn(1,item)"></image>
<image src="/static/shopCarIc/reduce.png" mode="" @click="numBtn(0, item)"></image>
<view class="num flexC">{{ item.total_num }}</view>
<image src="/static/shopCarIc/add.png" mode="" @click="numBtn(1, item)"></image>
</view>
</view>
</view>
</view>
<view class="" style="height: 120rpx;"></view>
<view class="" style="height: 120rpx"></view>
</view>
<!-- 购物车为空 -->
<view class="nullBox flexV" v-else>
... ... @@ -60,13 +61,11 @@
<view class="amountBox flexA">
<view class="settleBox flexA" v-if="data.btnStatus">
<view class="settle">合计:</view>
<view class="money flexA">
¥{{allMoney}}
</view>
<view class="money flexA">¥{{ +allMoney.toFixed(2) }}</view>
</view>
<!-- 结算和删除按钮 -->
<view class="btns flexC" @click="settleBtn">
{{data.btnStatus?'结算':'删除'}}
{{ data.btnStatus ? '结算' : '删除' }}
</view>
</view>
</view>
... ... @@ -74,113 +73,113 @@
</template>
<script setup>
import { ref,reactive,computed } from 'vue'
import {onShow,onLoad} from '@dcloudio/uni-app'
import { getCarList,getCarAdd,getCarReduce,getDelCar } from '@/api/'
onShow(()=>{
import { ref, reactive, computed } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import { getCarList, getCarAdd, getCarReduce, getDelCar } from '@/api/'
onShow(() => {
getCarLists() //购物车列表
// 默认地址
uni.getStorageSync('defaultAdres') ? data.adress = uni.getStorageSync('defaultAdres').diqu + uni.getStorageSync('defaultAdres').address : ''
console.log('默认',data.adress)
})
// 商品数组
let data = reactive({
shopList:[],
btnStatus:true ,// 右上角按钮状态
adress:'请新建默认地址',
})
// 修改右上角按钮状态
const changingOver = ()=> {
uni.getStorageSync('defaultAdres') ? (data.adress = uni.getStorageSync('defaultAdres').diqu + uni.getStorageSync('defaultAdres').address) : ''
console.log('默认', data.adress)
})
// 商品数组
let data = reactive({
shopList: [],
btnStatus: true, // 右上角按钮状态
adress: '请新建默认地址'
})
// 修改右上角按钮状态
const changingOver = () => {
console.log(data.btnStatus)
data.btnStatus = !data.btnStatus
}
//新建收货地址
const toMyAddress = ()=> {
}
//新建收货地址
const toMyAddress = () => {
uni.navigateTo({
url:'/pages/mine/myAddress'
url: '/pages/mine/myAddress'
})
}
// 勾选商品
const checkShop = (index) => {
}
// 勾选商品
const checkShop = index => {
// let str = data.shopList.some(item=>item.goodstatus == 3)
// console.log(str)
data.shopList[index].checkType = !data.shopList[index].checkType
}
const settleBtn = ()=> {
if(data.btnStatus) {
}
const settleBtn = () => {
if (data.btnStatus) {
// 结算的商品购物车id
let arrId = data.shopList.filter(item=>item.checkType).map(it=>it.cart_id)
let arrId = data.shopList.filter(item => item.checkType).map(it => it.cart_id)
uni.navigateTo({
url:`/pages/shopCar/confirmOrder?ids=${arrId.join(',')}`
url: `/pages/shopCar/confirmOrder?ids=${arrId.join(',')}`
})
} else {
let arr = data.shopList.filter(item=>item.checkType).map(it=>it.cart_id)
let arr = data.shopList.filter(item => item.checkType).map(it => it.cart_id)
getDelCars(arr.join(',')) //删除
}
}
// 删除购物商品
const getDelCars = async (ids)=>{
}
// 删除购物商品
const getDelCars = async ids => {
try {
const res = await getDelCar(ids)
getCarLists()
uni.showToast({ title:'成功移出购物车~',icon:'none' })
uni.showToast({ title: '成功移出购物车~', icon: 'none' })
console.log('getDelCar', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getDelCar', err)
}
}
// 数量加减按钮
const numBtn = (type,item) => {
if(type == 0 ) {
if(item.total_num == 1) return uni.showToast({ title:'至少一件哦~',icon:'none' })
getCarReduces(item.cart_id,item.total_num - 1)
}
// 数量加减按钮
const numBtn = (type, item) => {
if (type == 0) {
if (item.total_num == 1) return uni.showToast({ title: '至少一件哦~', icon: 'none' })
getCarReduces(item.cart_id, item.total_num - 1)
item.total_num = item.total_num - 1
} else {
getCarAdds(item.cart_id,item.total_num + 1)
getCarAdds(item.cart_id, item.total_num + 1)
item.total_num = item.total_num + 1
}
}
// 数量加
const getCarAdds = async (id,num)=>{
}
// 数量加
const getCarAdds = async (id, num) => {
try {
const res = await getCarAdd(id,num)
const res = await getCarAdd(id, num)
console.log('getCarAdd', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getCarAdd', err)
}
}
// 数量减
const getCarReduces = async (id,num)=>{
}
// 数量减
const getCarReduces = async (id, num) => {
try {
const res = await getCarReduce(id,num)
const res = await getCarReduce(id, num)
console.log('getCarReduce', res)
// 保存数据
} catch (err) {
uni.showToast({ title:err,icon:'none' })
uni.showToast({ title: err, icon: 'none' })
console.log('getCarReduce', err)
}
}
// 全选
const checkAll = ()=> {
if(allCheck.value) {
data.shopList.forEach(item=>{
}
// 全选
const checkAll = () => {
if (allCheck.value) {
data.shopList.forEach(item => {
item.checkType = false
})
} else {
data.shopList.forEach(item=>{
data.shopList.forEach(item => {
item.checkType = true
})
}
}
// 购物车列表
const getCarLists = async ()=>{
}
// 购物车列表
const getCarLists = async () => {
try {
const res = await getCarList()
res.goods_list.forEach(item=>item.checkType = false)
res.goods_list.forEach(item => (item.checkType = false))
data.shopList = res.goods_list
console.log('是什么', data.shopList)
console.log('getCarList', res)
... ... @@ -188,27 +187,31 @@
} catch (err) {
console.log('getCarList', err)
}
}
// 是否全选
const allCheck = computed(() => {
return data.shopList.every(item=> item.checkType === true)
})
//总价
const allMoney = computed(() => {
return data.shopList.filter(it=>it.checkType).reduce((acc,item)=>{ return acc + item.total_price*1 },0)
})
}
// 是否全选
const allCheck = computed(() => {
return data.shopList.every(item => item.checkType === true)
})
//总价
const allMoney = computed(() => {
return data.shopList
.filter(it => it.checkType)
.reduce((acc, item) => {
return acc + item.total_price * 1
}, 0)
})
</script>
<style lang="scss">
.u-icon__icon {
.u-icon__icon {
display: none !important;
}
}
page {
background: #F6F8FA;
}
page {
background: #f6f8fa;
}
.minBox {
.minBox {
width: 100%;
padding: 24rpx;
box-sizing: border-box;
... ... @@ -217,7 +220,6 @@
margin: 24rpx 0;
.amount {
image {
margin-right: 8rpx;
width: 24rpx;
... ... @@ -303,7 +305,7 @@
.numBox {
.rightTitle {
color: #F33F2E;
color: #f33f2e;
font-size: 40rpx;
font-weight: 700;
... ... @@ -333,9 +335,9 @@
}
}
}
}
}
.payBox {
.payBox {
position: fixed;
bottom: 0;
width: 100%;
... ... @@ -383,9 +385,9 @@
font-weight: 700;
}
}
}
}
.nullBox {
.nullBox {
margin-top: 266rpx;
image {
... ... @@ -394,7 +396,7 @@
margin-bottom: 24rpx;
}
color: #C6C5C8;
color: #c6c5c8;
font-size: 28rpx;
}
}
</style>
... ...
... ... @@ -27,7 +27,7 @@ var methods = {
pay(res) {
if (res.appId) {
common_vendor.index.requestPayment({
"provider": "wxpay",
provider: "wxpay",
timeStamp: res.timeStamp,
nonceStr: res.nonceStr,
package: res.package,
... ...
... ... @@ -8,6 +8,7 @@ if (!Math) {
"./pages/index/search.js";
"./pages/index/shopDetaile.js";
"./pages/index/allComment.js";
"./pages/index/bargainPrice.js";
"./pages/class/class.js";
"./pages/class/classList.js";
"./pages/pointsMall/pointsMall.js";
... ...
... ... @@ -4,6 +4,7 @@
"pages/index/search",
"pages/index/shopDetaile",
"pages/index/allComment",
"pages/index/bargainPrice",
"pages/class/class",
"pages/class/classList",
"pages/pointsMall/pointsMall",
... ...
... ... @@ -8774,6 +8774,7 @@ exports.getCurrentInstance = getCurrentInstance;
exports.index = index$1;
exports.isRef = isRef;
exports.n = n;
exports.nextTick = nextTick;
exports.o = o;
exports.onHide = onHide;
exports.onLoad = onLoad;
... ...
... ... @@ -99,11 +99,6 @@ const _sfc_main = {
const res = await api_index.getPay(params);
proxy.$methods.pay(res);
canclePop();
console.log("getPay", res);
common_vendor.index.showToast({ title: "\u652F\u4ED8\u6210\u529F", icon: "none" });
setTimeout(() => {
common_vendor.index.navigateBack();
}, 1500);
} catch (err) {
common_vendor.index.showToast({ title: err, icon: "none" });
console.log("getPay", err);
... ...
... ... @@ -62,7 +62,7 @@
.popBox .popModeBox .insufficient .go {
margin-left: 8rpx;
font-size: 24rpx;
color: #FB3E3C;
color: #fb3e3c;
line-height: 32rpx;
}
.popBox .popModeBox .insufficient .go image {
... ...
... ... @@ -8,7 +8,12 @@ const _sfc_main = {
}
},
setup(__props) {
const props = __props;
const textHandler = (orderStatus) => [1, 11].includes(orderStatus) ? "\u9700\u4ED8\u6B3E\uFF1A" : [2, 3, 4, 21].includes(orderStatus) ? "\u5B9E\u4ED8\u6B3E\uFF1A" : "";
common_vendor.onMounted(() => {
common_vendor.nextTick(() => {
console.log(props.shop, "\u8BA2\u5355\u6570\u636E\u662F\u4EC0\u4E48");
});
});
return (_ctx, _cache) => {
return {
... ... @@ -21,12 +26,14 @@ const _sfc_main = {
e: it.goodstatus != 3
}, it.goodstatus != 3 ? {
f: common_vendor.t(it.total_price),
g: common_vendor.t(it.total_price)
g: common_vendor.t(textHandler(__props.shop.order_status)),
h: common_vendor.t(it.total_price)
} : {
h: common_vendor.t(it.coscore),
i: common_vendor.t(it.diff_price)
i: common_vendor.t(textHandler(__props.shop.order_status)),
j: common_vendor.t(it.coscore),
k: common_vendor.t(it.diff_price)
}, {
j: it.id
l: it.id
});
})
};
... ...
<view wx:for="{{a}}" wx:for-item="it" wx:key="j" class="shop"><view class="shopPhoto"><image src="{{it.a}}" mode=""></image></view><view class="info"><view class="shopTitle ellipsis">{{it.b}}</view><view class="desc ellipsis">{{it.c}}</view><view class="num ellipsis">x{{it.d}}</view><view wx:if="{{it.e}}" class="priceBox flexJ"><text>¥{{it.f}}</text><view class="reality flexA"><view class="shi">实付款:</view><text>¥</text><view class="price">{{it.g}}</view></view></view><view wx:else class="pointsShop"><text>需付款:</text><image src="/static/shopCarIc/pointsIc.png" mode=""></image><view class="points">{{it.h}}</view><view class="pointsPrice">¥{{it.i}}</view></view></view></view>
\ No newline at end of file
<view wx:for="{{a}}" wx:for-item="it" wx:key="l" class="shop"><view class="shopPhoto"><image src="{{it.a}}" mode=""></image></view><view class="info"><view class="shopTitle ellipsis">{{it.b}}</view><view class="desc ellipsis">{{it.c}}</view><view class="num ellipsis">x{{it.d}}</view><view wx:if="{{it.e}}" class="priceBox flexJ"><text>¥{{it.f}}</text><view class="reality flexA"><view class="shi">{{it.g}}</view><text>¥</text><view class="price">{{it.h}}</view></view></view><view wx:else class="pointsShop"><text>{{it.i}}</text><image src="/static/shopCarIc/pointsIc.png" mode=""></image><view class="points">{{it.j}}</view><view class="pointsPrice">¥{{it.k}}</view></view></view></view>
\ No newline at end of file
... ...
... ... @@ -18,6 +18,7 @@ const _sfc_main = {
type: Number,
default: 0
},
shopType: Number,
payPopShow: {
type: Boolean,
default: false
... ... @@ -111,11 +112,21 @@ const _sfc_main = {
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(__props.btnType == 0 ? "\u52A0\u5165\u8D2D\u7269\u8F66" : "\u7ACB\u5373\u8D2D\u4E70"),
b: __props.shopDetail.spec[0].spec_image,
c: common_vendor.t(__props.shopDetail.name),
d: common_vendor.t(__props.shopDetail.spec[0].goods_price),
e: common_vendor.f(common_vendor.unref(data).speList, (item, index, i0) => {
a: __props.shopType !== 3
}, __props.shopType !== 3 ? {
b: common_vendor.t(__props.btnType == 0 ? "\u52A0\u5165\u8D2D\u7269\u8F66" : "\u7ACB\u5373\u8D2D\u4E70")
} : {}, {
c: __props.shopType === 3
}, __props.shopType === 3 ? {} : {}, {
d: __props.shopDetail.spec[0].spec_image,
e: common_vendor.t(__props.shopDetail.name),
f: __props.shopDetail.goodstatus !== 3
}, __props.shopDetail.goodstatus !== 3 ? {
g: common_vendor.t(__props.shopDetail.spec[0].goods_price)
} : {
h: common_vendor.t(__props.shopDetail.spec[0].coscore)
}, {
i: common_vendor.f(common_vendor.unref(data).speList, (item, index, i0) => {
return {
a: common_vendor.t(item.group_name),
b: common_vendor.f(item.spec_items, (it, idx, i1) => {
... ... @@ -129,21 +140,21 @@ const _sfc_main = {
c: item.group_id
};
}),
f: common_vendor.o(valChange),
g: common_vendor.o(($event) => _ctx.value = $event),
h: common_vendor.p({
j: common_vendor.o(valChange),
k: common_vendor.o(($event) => _ctx.value = $event),
l: common_vendor.p({
modelValue: _ctx.value
}),
i: __props.btnType == 0
m: __props.btnType == 0
}, __props.btnType == 0 ? {
j: common_vendor.o(popBtn)
n: common_vendor.o(popBtn)
} : {
k: common_vendor.t(__props.shopDetail.goodstatus == 3 ? "\u7ACB\u5373\u5151\u6362" : "\u7ACB\u5373\u8D2D\u4E70"),
l: common_vendor.o(popBtn)
o: common_vendor.t(__props.shopDetail.goodstatus == 3 ? "\u7ACB\u5373\u5151\u6362" : "\u7ACB\u5373\u8D2D\u4E70"),
p: common_vendor.o(popBtn)
}, {
m: common_vendor.o(close),
n: common_vendor.o(_ctx.open),
o: common_vendor.p({
q: common_vendor.o(close),
r: common_vendor.o(_ctx.open),
s: common_vendor.p({
show: __props.payPopShow,
mode: "bottom",
closeable: true,
... ...
<u-popup wx:if="{{o}}" u-s="{{['d']}}" bindclose="{{m}}" bindopen="{{n}}" u-i="4f7ddfed-0" bind:__l="__l" u-p="{{o}}"><view class="popBox"><view class="title flexC">{{a}}</view><view class="topBox flexA"><view class="shopPhoto"><image src="{{b}}" mode=""></image></view><view class="price"><view class="shopName ellipsis">{{c}}</view><view class="money"> ¥{{d}}</view></view></view><view wx:for="{{e}}" wx:for-item="item" wx:key="c" style="margin-bottom:44rpx"><view class="specificationsTile">{{item.a}}</view><view class="colorBox"><view wx:for="{{item.b}}" wx:for-item="it" wx:key="b" class="{{['item', it.c]}}" bindtap="{{it.d}}">{{it.a}}</view></view></view><view class="numBox flexJ"><view class="rightTitle flexA"> 数量 </view><view class="and flexA"><u-number-box wx:if="{{h}}" bindchange="{{f}}" u-i="4f7ddfed-1,4f7ddfed-0" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-number-box></view></view><view wx:if="{{i}}" class="popBtn flexC" bindtap="{{j}}"> 加入购物车 </view><view wx:else class="popBtn1 flexC" bindtap="{{l}}">{{k}}</view></view></u-popup>
\ No newline at end of file
<u-popup wx:if="{{s}}" u-s="{{['d']}}" bindclose="{{q}}" bindopen="{{r}}" u-i="4f7ddfed-0" bind:__l="__l" u-p="{{s}}"><view class="popBox"><view wx:if="{{a}}" class="title flexC">{{b}}</view><view wx:if="{{c}}" class="title flexC">立即兑换</view><view class="topBox flexA"><view class="shopPhoto"><image src="{{d}}" mode=""></image></view><view class="price"><view class="shopName ellipsis">{{e}}</view><view wx:if="{{f}}" class="money">¥{{g}}</view><view wx:else class="money">{{h}}积分</view></view></view><view wx:for="{{i}}" wx:for-item="item" wx:key="c" style="margin-bottom:44rpx"><view class="specificationsTile">{{item.a}}</view><view class="colorBox"><view wx:for="{{item.b}}" wx:for-item="it" wx:key="b" class="{{['item', it.c]}}" bindtap="{{it.d}}">{{it.a}}</view></view></view><view class="numBox flexJ"><view class="rightTitle flexA">数量</view><view class="and flexA"><u-number-box wx:if="{{l}}" bindchange="{{j}}" u-i="4f7ddfed-1,4f7ddfed-0" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"></u-number-box></view></view><view wx:if="{{m}}" class="popBtn flexC" bindtap="{{n}}">加入购物车</view><view wx:else class="popBtn1 flexC" bindtap="{{p}}">{{o}}</view></view></u-popup>
\ No newline at end of file
... ...
... ... @@ -113,13 +113,13 @@
height: 32rpx;
}
.popBox .payBox .yue {
color: #F33F2E;
color: #f33f2e;
font-size: 30rpx;
font-weight: 700;
}
.popBox .payBox .yue text {
margin-top: 5rpx;
color: #F33F2E;
color: #f33f2e;
font-size: 24rpx;
}
.popBox .popBtn {
... ...
... ... @@ -17,7 +17,8 @@ const _sfc_main = {
list: {
type: Array,
default: []
}
},
isClass: Boolean
},
setup(__props) {
const props = __props;
... ... @@ -46,16 +47,20 @@ const _sfc_main = {
e: __props.shopHeight == 322
}, __props.shopHeight == 322 ? {
f: common_vendor.t(item.line_price)
} : {}, {
g: __props.isClass
}, __props.isClass ? {
h: common_vendor.t(item.spyprice)
} : {}) : {
g: common_vendor.t(item.coscore)
i: common_vendor.t(item.coscore)
}, __props.shopWidth == 344 ? {
h: common_vendor.t(__props.pointShop ? "\u5DF2\u5151\u6362\uFF1A" : "\u5DF2\u552E\uFF1A"),
i: common_vendor.t(item.sales_actual)
j: common_vendor.t(__props.pointShop ? "\u5DF2\u5151\u6362\uFF1A" : "\u5DF2\u552E\uFF1A"),
k: common_vendor.t(item.sales_actual)
} : {}, __props.shopHeight == 322 ? {
j: common_vendor.t(item.stock_num)
l: common_vendor.t(item.stock_num)
} : {}, {
k: item.id,
l: common_vendor.o(($event) => toDetaile(item.id), item.id)
m: item.id,
n: common_vendor.o(($event) => toDetaile(item.id), item.id)
});
}),
b: !__props.pointShop,
... ...
<view class="flexW" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="k" class="shopBox" bindtap="{{item.l}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.g}}</view><view wx:if="{{c}}" class="sold">{{item.h}}{{item.i}}份</view><view wx:if="{{d}}" class="sold">库存:{{item.j}}件</view></view></view></view>
\ No newline at end of file
<view class="flexW" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="m" class="shopBox" bindtap="{{item.n}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view><view wx:if="{{item.g}}" class="original">¥{{item.h}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.i}}</view><view wx:if="{{c}}" class="sold">{{item.j}}{{item.k}}份</view><view wx:if="{{d}}" class="sold">库存:{{item.l}}件</view></view></view></view>
\ No newline at end of file
... ...
... ... @@ -15,28 +15,15 @@ const _sfc_main = {
shopList.value = res;
console.log(res, "\u5206\u7C7B\u5546\u54C1\u5217\u8868");
});
const keyWord = common_vendor.ref("");
const doSearchs = () => {
};
const input = (e) => {
if (e.detail.value == "") {
emit("input", e.detail.value);
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(doSearchs),
b: common_vendor.o(input),
c: common_vendor.p({
keyWord: keyWord.value,
disabled: false
}),
d: common_vendor.p({
a: common_vendor.p({
list: shopList.value,
shopWidth: 344,
shopHeight: 344
shopHeight: 344,
isClass: true
}),
e: !shopList.value.length
b: !shopList.value.length
}, !shopList.value.length ? {} : {});
};
}
... ...
<search wx:if="{{c}}" binddoSearchs="{{a}}" bindinput="{{b}}" u-i="33f20787-0" bind:__l="__l" u-p="{{c}}"></search><view class="mainBox"><shops wx:if="{{d}}" u-i="33f20787-1" bind:__l="__l" u-p="{{d}}"/></view><view wx:if="{{e}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view>
\ No newline at end of file
<search u-i="33f20787-0" bind:__l="__l"></search><view class="mainBox"><shops wx:if="{{a}}" u-i="33f20787-1" bind:__l="__l" u-p="{{a}}"/></view><view wx:if="{{b}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view>
\ No newline at end of file
... ...
"use strict";
var common_vendor = require("../../common/vendor.js");
var api_index = require("../../api/index.js");
require("../../utils/request.js");
if (!Array) {
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
_easycom_u_navbar2();
}
const _easycom_u_navbar = () => "../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
if (!Math) {
(_easycom_u_navbar + search + shops)();
}
const search = () => "../../componets/searchBox.js";
const shops = () => "../../componets/shops.js";
const _sfc_main = {
setup(__props) {
common_vendor.onShow(() => {
getIndexs();
});
let shopList = common_vendor.ref([]);
const getIndexs = async () => {
try {
const res = await api_index.getIndex();
shopList.value = res.tjgoods;
} catch (err) {
common_vendor.index.showToast({ title: err, icon: "none" });
console.log("getIndex", err);
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
bgColor: "#F6F8FA",
title: "\u7279\u4EF7\u4E13\u533A",
placeholder: true,
autoBack: true
}),
b: common_vendor.p({
list: common_vendor.unref(shopList),
shopWidth: 344,
shopHeight: 344,
pointShop: false
}),
c: !common_vendor.unref(shopList).length
}, !common_vendor.unref(shopList).length ? {} : {});
};
}
};
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/vue/\u5927\u5065\u5EB7\u5546\u57CE/healthMall/pages/index/bargainPrice.vue"]]);
wx.createPage(MiniProgramPage);
... ...
{
"navigationStyle": "custom",
"usingComponents": {
"u-navbar": "../../uni_modules/uview-plus/components/u-navbar/u-navbar",
"search": "../../componets/searchBox",
"shops": "../../componets/shops"
}
}
\ No newline at end of file
... ...
<view><u-navbar wx:if="{{a}}" u-i="b00c9e08-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view><search u-i="b00c9e08-1" bind:__l="__l"/><view class="mainBox"><shops wx:if="{{b}}" u-i="b00c9e08-2" bind:__l="__l" u-p="{{b}}"/></view></view><view wx:if="{{c}}" class="null flexV"><image class="sss" src="/static/pointsMallic/pointsShopNull.png" mode=""></image><text>暂无商品信息</text></view></view>
\ No newline at end of file
... ...
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* uni.scss */
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
page {
background: #f6f8fa;
}
.mainBox {
width: 100%;
padding: 16rpx 24rpx;
box-sizing: border-box;
}
.null {
margin-top: 266rpx;
}
.null text {
position: relative;
margin-top: -80rpx;
color: #00000066;
font-size: 26rpx;
}
.null image {
width: 348rpx;
height: 348rpx;
}
\ No newline at end of file
... ...
... ... @@ -14,7 +14,11 @@ const search = () => "../../componets/searchBox.js";
const shops = () => "../../componets/shops.js";
const _sfc_main = {
setup(__props) {
const lastPage = common_vendor.ref(1);
const curPage = common_vendor.ref(1);
common_vendor.onShow(() => {
curPage.value = 1;
data.recommendList.splice(0);
getIndexs();
});
const toRecharg = () => {
... ... @@ -32,18 +36,27 @@ const _sfc_main = {
common_vendor.index.switchTab({ url: "/pages/class/class" });
};
const jumpClassHandler = () => common_vendor.index.switchTab({ url: "/pages/class/class" });
const toBargainPriceMoreHandler = () => common_vendor.index.navigateTo({ url: "/pages/index/bargainPrice" });
const getIndexs = async () => {
try {
const res = await api_index.getIndex();
const res = await api_index.getIndex({ page: curPage.value });
data.classList = res.fenlei;
data.specialList = res.tjgoods;
data.recommendList = res.goods;
data.recommendList = data.recommendList.concat(res.goods.data);
console.log(data.recommendList, "\u63A8\u8350\u5546\u54C1");
console.log("getIndex", res);
lastPage.value = res.goods.last_page;
} catch (err) {
common_vendor.index.showToast({ title: err, icon: "none" });
console.log("getIndex", err);
}
};
common_vendor.onReachBottom(() => {
curPage.value++;
if (curPage.value >= lastPage.value)
return;
api_index.getIndex();
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
... ... @@ -59,12 +72,13 @@ const _sfc_main = {
};
}),
d: common_vendor.o(jumpClassHandler),
e: common_vendor.p({
e: common_vendor.o(toBargainPriceMoreHandler),
f: common_vendor.p({
list: common_vendor.unref(data).specialList.slice(0, 2),
shopWidth: 322,
shopHeight: 322
}),
f: common_vendor.p({
g: common_vendor.p({
list: common_vendor.unref(data).recommendList,
shopWidth: 344,
shopHeight: 344
... ...
<view><u-navbar wx:if="{{a}}" u-s="{{['left']}}" u-i="0a7f8b7d-0" bind:__l="__l" u-p="{{a}}"><view class="u-nav-slot" slot="left">大健康商城</view></u-navbar><view class="topBgBox"><image src="/static/indexIc/topBg.png" mode=""></image><view class="searchBox"><search u-i="0a7f8b7d-1" bind:__l="__l"></search><view class="vip flexC" bindtap="{{b}}"><image src="/static/indexIc/vip.png" mode=""></image></view></view></view><view class="classBox"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="itemClss flexV" bindtap="{{item.d}}"><image src="{{item.a}}" mode=""></image><text>{{item.b}}</text></view><view class="itemClss flexV" bindtap="{{d}}"><image src="/static/indexIc/classIc.png" mode=""></image><text>更多</text></view></view><view class="specialOffer"><image class="pinkBg" src="/static/indexIc/pinkBg.png" mode=""></image><view class="special"><view class="topBox flexJ"><view class="titles"><view class="title">特价专区</view><text>JiangChengYuanTi</text></view><view class="more flexA"> 更多 <image src="/static/indexIc/orangeRight.png" mode=""></image></view></view><view class="shop"><shops wx:if="{{e}}" u-i="0a7f8b7d-2" bind:__l="__l" u-p="{{e}}"></shops></view></view></view><view class="recom flexA"><image src="/static/indexIc/recommendIc.png" mode=""></image> 推荐商品 <text>限时限量好物推荐</text></view><view class="recomBox"><shops wx:if="{{f}}" u-i="0a7f8b7d-3" bind:__l="__l" u-p="{{f}}"></shops></view></view>
\ No newline at end of file
<view><u-navbar wx:if="{{a}}" u-s="{{['left']}}" u-i="0a7f8b7d-0" bind:__l="__l" u-p="{{a}}"><view class="u-nav-slot" slot="left">大健康商城</view></u-navbar><view class="topBgBox"><image src="/static/indexIc/topBg.png" mode=""></image><view class="searchBox"><search u-i="0a7f8b7d-1" bind:__l="__l"></search><view class="vip flexC" bindtap="{{b}}"><image src="/static/indexIc/vip.png" mode=""></image></view></view></view><view class="classBox"><view wx:for="{{c}}" wx:for-item="item" wx:key="c" class="itemClss flexV" bindtap="{{item.d}}"><image src="{{item.a}}" mode=""></image><text>{{item.b}}</text></view><view class="itemClss flexV" bindtap="{{d}}"><image src="/static/indexIc/classIc.png" mode=""></image><text>更多</text></view></view><view class="specialOffer"><image class="pinkBg" src="/static/indexIc/pinkBg.png" mode=""></image><view class="special"><view class="topBox flexJ"><view class="titles"><view class="title">特价专区</view><text>Special price zone</text></view><view class="more flexA" bindtap="{{e}}"> 更多 <image src="/static/indexIc/orangeRight.png" mode=""></image></view></view><view class="shop"><shops wx:if="{{f}}" u-i="0a7f8b7d-2" bind:__l="__l" u-p="{{f}}"></shops></view></view></view><view class="recom flexA"><image src="/static/indexIc/recommendIc.png" mode=""></image> 推荐商品 <text>限时限量好物推荐</text></view><view class="recomBox"><shops wx:if="{{g}}" u-i="0a7f8b7d-3" bind:__l="__l" u-p="{{g}}"></shops></view></view>
\ No newline at end of file
... ...
... ... @@ -27,11 +27,7 @@ const _sfc_main = {
payPopShow.value = false;
});
const currentNum = common_vendor.ref(0);
common_vendor.reactive([
"https://cdn.uviewui.com/uview/swiper/swiper2.png",
"https://cdn.uviewui.com/uview/swiper/swiper3.png",
"https://cdn.uviewui.com/uview/swiper/swiper1.png"
]);
common_vendor.reactive(["https://cdn.uviewui.com/uview/swiper/swiper2.png", "https://cdn.uviewui.com/uview/swiper/swiper3.png", "https://cdn.uviewui.com/uview/swiper/swiper1.png"]);
const icList = common_vendor.reactive([
{ id: 1, name: "\u5E97\u94FA", icon: "/static/indexIc/shopIc.png" },
{ id: 2, name: "\u5BA2\u670D", icon: "/static/indexIc/service.png" },
... ... @@ -161,6 +157,7 @@ const _sfc_main = {
x: common_vendor.p({
moreSpec: common_vendor.unref(moreSpec),
shopDetail: common_vendor.unref(detaileList),
shopType: common_vendor.unref(shopType),
btnType: common_vendor.unref(btnType),
payPopShow: common_vendor.unref(payPopShow)
})
... ...
... ... @@ -38,7 +38,7 @@
justify-content: center;
}
.indicator-num__text {
color: #FFFFFF;
color: #ffffff;
font-size: 12px;
}
.swiperBox {
... ...
... ... @@ -22,7 +22,7 @@ const _sfc_main = {
const submit = () => {
getComments();
};
const addPhoto = () => proxy.$methods.upload("http://healthmall.shs.broing.cn/api/common/upload", (imgUrl) => {
const addPhoto = () => proxy.$methods.upload("http://health.shs.broing.cn/api/common/upload", (imgUrl) => {
console.log("\u8FD4\u56DE\u56FE\u7247", imgUrl);
photoList.push(imgUrl.avatar);
});
... ...
<view><u-navbar wx:if="{{a}}" u-i="6013ecfd-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="boxs"><view class="title">上传图片</view><view class="photoBox"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="itemPhoto"><image class="photo" src="{{item.a}}" mode=""></image><view class="delBox flexC" bindtap="{{item.b}}"><image class="del" src="/static/mineIc/close.png" mode=""></image></view></view><view class="addPhoto flexV" bindtap="{{d}}"><image src="/static/mineIc/addIC.png" mode=""></image> 还可添加{{c}}张 </view></view><view class="desc"><block wx:if="{{r0}}"><textarea placeholder-class="pls" placeholder="请输入" name="" id="" cols="30" rows="10" value="{{e}}" bindinput="{{f}}"></textarea></block></view><view class="startBox flexA"><text>综合评分</text><u-rate wx:if="{{h}}" u-i="6013ecfd-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-rate></view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{i}}"> 提交评论 </view></view></view>
\ No newline at end of file
<view><u-navbar wx:if="{{a}}" u-i="6013ecfd-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="boxs"><view class="title">上传图片</view><view class="photoBox"><view wx:for="{{b}}" wx:for-item="item" wx:key="c" class="itemPhoto"><image class="photo" src="{{item.a}}" mode=""></image><view class="delBox flexC" bindtap="{{item.b}}"><image class="del" src="/static/mineIc/close.png" mode=""></image></view></view><view class="addPhoto flexV" bindtap="{{d}}"><image src="/static/mineIc/addIC.png" mode=""></image> 还可添加{{c}}张 </view></view><view class="desc"><block wx:if="{{r0}}"><textarea placeholder-class="pls" placeholder="请输入" name="" id="" cols="30" rows="10" value="{{e}}" bindinput="{{f}}"></textarea></block></view><view class="startBox flexA"><text>综合评分</text><u-rate wx:if="{{h}}" u-i="6013ecfd-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></u-rate></view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{i}}">提交评论</view></view></view>
\ No newline at end of file
... ...
... ... @@ -62,7 +62,7 @@ page {
top: 0;
width: 24rpx;
height: 24rpx;
background: #484B46;
background: #484b46;
border-radius: 0 8rpx 0 8rpx;
}
.boxs .photoBox .itemPhoto .delBox .del {
... ...
... ... @@ -28,26 +28,7 @@ const _sfc_main = {
});
let tabStatus = common_vendor.ref(0);
let orderList = common_vendor.ref([]);
const list1 = common_vendor.reactive([
{
name: "\u5168\u90E8"
},
{
name: "\u5F85\u4ED8\u6B3E"
},
{
name: "\u5F85\u53D1\u8D27"
},
{
name: "\u5F85\u6536\u8D27"
},
{
name: "\u5F85\u8BC4\u4EF7"
},
{
name: "\u552E\u540E"
}
]);
const list1 = common_vendor.reactive([{ name: "\u5168\u90E8" }, { name: "\u5F85\u4ED8\u6B3E" }, { name: "\u5F85\u53D1\u8D27" }, { name: "\u5F85\u6536\u8D27" }, { name: "\u5F85\u8BC4\u4EF7" }, { name: "\u552E\u540E" }]);
const operateOrder = (item, type) => {
orderId.value = item.id;
if (type == 0 || type == 2) {
... ... @@ -181,8 +162,8 @@ const _sfc_main = {
} : {}, {
d: [3, 4, 21].includes(item.order_status)
}, [3, 4, 21].includes(item.order_status) ? {
e: common_vendor.t(item.order_no),
f: common_vendor.o(($event) => copy(item.order_no))
e: common_vendor.t(item.express_no),
f: common_vendor.o(($event) => copy(item.express_no))
} : {}, {
g: "67be9ace-3-" + i0,
h: common_vendor.p({
... ... @@ -207,8 +188,8 @@ const _sfc_main = {
}, item.order_status == 3 && item.goodstatus_text == "" ? {} : {}, {
s: common_vendor.o(($event) => operateOrder(item, 3))
}) : {}, {
t: item.order_status == 4 && item.goodstatus_text != 3
}, item.order_status == 4 && item.goodstatus_text != 3 ? {
t: item.order_status == 4
}, item.order_status == 4 ? {
v: common_vendor.o(($event) => operateOrder(item, 4))
} : {}, {
w: item.order_status == 21
... ...
... ... @@ -39,7 +39,7 @@ const _sfc_main = {
};
const copy = () => {
common_vendor.index.setClipboardData({
data: orderList.value.order_no,
data: orderList.value.express_no,
success: () => {
common_vendor.index.showToast({ title: "\u590D\u5236\u6210\u529F", icon: "none" });
}
... ... @@ -69,7 +69,7 @@ const _sfc_main = {
placeOrder.value[0].text = res.order_no;
placeOrder.value[1].text = res.zhifu == 1 ? "\u5FAE\u4FE1" : "\u4F59\u989D";
placeOrder.value[2].text = res.createtime;
placeOrder.value[3].text = res.pay_order_no;
placeOrder.value[3].text = res.express_no;
console.log("getOrderdetail", res);
} catch (err) {
common_vendor.index.showToast({ title: err, icon: "none" });
... ... @@ -120,8 +120,17 @@ const _sfc_main = {
d: common_vendor.p({
shop: common_vendor.unref(orderList)
}),
e: common_vendor.t(common_vendor.unref(orderList).total_price),
f: common_vendor.f(common_vendor.unref(placeOrder), (item, index, i0) => {
e: common_vendor.unref(orderList).goodstatus_text !== 3
}, common_vendor.unref(orderList).goodstatus_text !== 3 ? {
f: common_vendor.t(common_vendor.unref(orderList).total_price)
} : {}, {
g: common_vendor.unref(orderList).goodstatus_text === 3
}, common_vendor.unref(orderList).goodstatus_text === 3 ? {
h: common_vendor.t(common_vendor.unref(orderList).express_price),
i: common_vendor.t(common_vendor.unref(orderList).score),
j: common_vendor.t(common_vendor.unref(orderList).express_price)
} : {}, {
k: common_vendor.f(common_vendor.unref(placeOrder), (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: common_vendor.t(item.text),
... ... @@ -132,27 +141,27 @@ const _sfc_main = {
e: item.id
});
}),
g: common_vendor.unref(btnType) == 3
l: common_vendor.unref(btnType) == 3
}, common_vendor.unref(btnType) == 3 ? {} : {}, {
h: common_vendor.unref(btnType) <= 2
m: common_vendor.unref(btnType) <= 2
}, common_vendor.unref(btnType) <= 2 ? {
i: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u53D6\u6D88\u4ED8\u6B3E" : common_vendor.unref(btnType) == 2 ? "\u7533\u8BF7\u9000\u6B3E" : "\u8054\u7CFB\u5BA2\u670D"),
j: common_vendor.o(($event) => btns(0))
n: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u53D6\u6D88\u4ED8\u6B3E" : common_vendor.unref(btnType) == 2 ? "\u7533\u8BF7\u9000\u6B3E" : "\u8054\u7CFB\u5BA2\u670D"),
o: common_vendor.o(($event) => btns(0))
} : {}, {
k: common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3
p: common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3
}, common_vendor.unref(btnType) == 1 || common_vendor.unref(btnType) == 3 ? {
l: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u7ACB\u5373\u652F\u4ED8" : "\u786E\u8BA4\u6536\u8D27"),
m: common_vendor.o(($event) => btns(1))
q: common_vendor.t(common_vendor.unref(btnType) == 1 ? "\u7ACB\u5373\u652F\u4ED8" : "\u786E\u8BA4\u6536\u8D27"),
r: common_vendor.o(($event) => btns(1))
} : {}, {
n: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false),
o: common_vendor.p({
s: common_vendor.o(($event) => common_vendor.isRef(modeShow) ? modeShow.value = false : modeShow = false),
t: common_vendor.p({
orderId: common_vendor.unref(orderId),
isOrderPay: true,
totalPrice: common_vendor.unref(orderList).total_price,
modeShow: common_vendor.unref(modeShow)
}),
p: common_vendor.o(pointsBtns),
q: common_vendor.p({
v: common_vendor.o(pointsBtns),
w: common_vendor.p({
integral: common_vendor.unref(integral),
tipType: common_vendor.unref(tipType),
tipShow: common_vendor.unref(tipShow)
... ...
<view><u-navbar wx:if="{{b}}" bindleftClick="{{a}}" u-i="a44fc2ea-0" bind:__l="__l" u-p="{{b}}"></u-navbar><view class="mainBox"><shop-addres wx:if="{{c}}" u-i="a44fc2ea-1" bind:__l="__l" u-p="{{c}}"></shop-addres><view class="shopBox"><order-shops wx:if="{{d}}" u-i="a44fc2ea-2" bind:__l="__l" u-p="{{d}}"></order-shops><view class="line"></view><view class="mode flexJ"><view class="left">提货方式</view><view class="right">快递配送</view></view></view><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付款</view><view class="money">¥{{e}}</view></view><view wx:for="{{f}}" wx:for-item="item" wx:key="e" class="moneyBox flexJ"><view class="items">{{item.a}} <text>{{item.b}}</text></view><view wx:if="{{item.c}}" bindtap="{{item.d}}" class="copy">复制</view></view></view><view class="btnBox iosAuto"><view wx:if="{{g}}" class="service flexC"><button open-type="contact">联系客服</button></view><view wx:if="{{h}}" class="gay flexC" bindtap="{{j}}">{{i}}</view><view wx:if="{{k}}" class="red flexC" bindtap="{{m}}">{{l}}</view></view><pay-mode wx:if="{{o}}" bindcanclePop="{{n}}" u-i="a44fc2ea-3" bind:__l="__l" u-p="{{o}}"></pay-mode><tip-pops wx:if="{{q}}" bindpointsBtns="{{p}}" u-i="a44fc2ea-4" bind:__l="__l" u-p="{{q}}"></tip-pops></view>
\ No newline at end of file
<view><u-navbar wx:if="{{b}}" bindleftClick="{{a}}" u-i="a44fc2ea-0" bind:__l="__l" u-p="{{b}}"></u-navbar><view class="mainBox"><shop-addres wx:if="{{c}}" u-i="a44fc2ea-1" bind:__l="__l" u-p="{{c}}"></shop-addres><view class="shopBox"><order-shops wx:if="{{d}}" u-i="a44fc2ea-2" bind:__l="__l" u-p="{{d}}"></order-shops><view class="line"></view><view class="mode flexJ"><view class="left">配送方式</view><view class="right">快递配送</view></view></view><view wx:if="{{e}}" class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付款</view><view class="money">¥{{f}}</view></view><block wx:if="{{g}}"><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>运费</view><view class="money">¥{{h}}</view></view><view class="moneyBox flexJ" style="margin-bottom:20rpx"><view>实付</view><view class="money"><text style="color:#000">{{i}}积分</text> +¥{{j}}</view></view></block><view wx:for="{{k}}" wx:for-item="item" wx:key="e" class="moneyBox flexJ"><view class="items">{{item.a}} <text>{{item.b}}</text></view><view wx:if="{{item.c}}" bindtap="{{item.d}}" class="copy">复制</view></view></view><view class="btnBox iosAuto"><view wx:if="{{l}}" class="service flexC"><button open-type="contact">联系客服</button></view><view wx:if="{{m}}" class="gay flexC" bindtap="{{o}}">{{n}}</view><view wx:if="{{p}}" class="red flexC" bindtap="{{r}}">{{q}}</view></view><pay-mode wx:if="{{t}}" bindcanclePop="{{s}}" u-i="a44fc2ea-3" bind:__l="__l" u-p="{{t}}"></pay-mode><tip-pops wx:if="{{w}}" bindpointsBtns="{{v}}" u-i="a44fc2ea-4" bind:__l="__l" u-p="{{w}}"></tip-pops></view>
\ No newline at end of file
... ...
<view><u-navbar wx:if="{{a}}" u-i="7023efea-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="blackBg"><view class="topBox"><image class="bg" src="/static/mineIc/vipBg.png" mode=""></image><view class="tipBox"><view class="balanceBox"><view class="tip">余额(元)</view><view class="balance flexA"><text>¥</text><view class="balances">{{b}}</view></view></view><view class="photo flexA"><open-data type="userAvatarUrl" class="avatar"></open-data><open-data type="userNickName" class="nickname"></open-data></view></view></view></view><view class="packageBox"><view class="title flexA">金额 <input type="number" placeholder-class="ples" placeholder="(自定义)" value="{{c}}" bindinput="{{d}}"></input></view><view class="package"><view wx:for="{{e}}" wx:for-item="item" wx:key="e" bindtap="{{item.c}}" class="{{['item', 'flexV', item.d]}}"><view class="recharge">冲{{item.a}}</view><view class="deliver">送{{item.b}}</view></view></view></view><view class="line"></view><view class="desc"><view class="descTitle">使用说明</view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{f}}">立即支付</view></view></view>
\ No newline at end of file
<view><u-navbar wx:if="{{a}}" u-i="7023efea-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="blackBg"><view class="topBox"><image class="bg" src="/static/mineIc/vipBg.png" mode=""></image><view class="tipBox"><view class="balanceBox"><view class="tip">余额(元)</view><view class="balance flexA"><text>¥</text><view class="balances">{{b}}</view></view></view><view class="photo flexA"><open-data type="userAvatarUrl" class="avatar"></open-data><open-data type="userNickName" class="nickname"></open-data></view></view></view></view><view class="packageBox"><view class="title flexA"> 金额 <input type="number" placeholder-class="ples" placeholder="(自定义)" value="{{c}}" bindinput="{{d}}"/></view><view class="package"><view wx:for="{{e}}" wx:for-item="item" wx:key="e" bindtap="{{item.c}}" class="{{['item', 'flexV', item.d]}}"><view class="recharge">冲{{item.a}}</view><view class="deliver">送{{item.b}}</view></view></view></view><view class="line"></view><view class="desc"><view class="descTitle">使用说明</view></view><view class="btnBox iosAuto"><view class="btn flexC" bindtap="{{f}}">立即支付</view></view></view>
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@
.blackBg {
width: 100%;
height: 278rpx;
background: #1D1E24;
background: #1d1e24;
padding: 32rpx 24rpx 0;
box-sizing: border-box;
}
... ... @@ -137,7 +137,7 @@
.line {
width: 100%;
height: 24rpx;
background: #F5F7FB;
background: #f5f7fb;
}
.desc {
width: 100%;
... ...
... ... @@ -153,7 +153,7 @@ const _sfc_main = {
j: common_vendor.o(checkAll),
k: common_vendor.unref(data).btnStatus
}, common_vendor.unref(data).btnStatus ? {
l: common_vendor.t(common_vendor.unref(allMoney))
l: common_vendor.t(+common_vendor.unref(allMoney).toFixed(2))
} : {}, {
m: common_vendor.t(common_vendor.unref(data).btnStatus ? "\u7ED3\u7B97" : "\u5220\u9664"),
n: common_vendor.o(settleBtn)
... ...
<view class=""><u-navbar wx:if="{{a}}" u-i="73f0a715-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:if="{{b}}" class="minBox"><view class="topBox flexJ"><view class="amount flexA" bindtap="{{d}}"><image src="/static/shopCarIc/shopAddress.png" mode=""></image><view class="adress ellipsis">{{c}}</view></view><view class="manage" bindtap="{{f}}">{{e}}</view></view><view wx:for="{{g}}" wx:for-item="item" wx:key="j" class="shopBox flexA"><view class="checkIc" catchtap="{{item.b}}"><image wx:if="{{item.a}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image></view><view class="shopPhoto"><image src="{{item.c}}" mode=""></image><image wx:if="{{item.d}}" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image></view><view class="infoBox"><view class="title ellipsis">{{item.e}}</view><view class="numBox flexJ"><view class="rightTitle flexA"><text>¥</text>{{item.f}}</view><view class="and flexA"><image src="/static/shopCarIc/reduce.png" mode="" bindtap="{{item.g}}"></image><view class="num flexC">{{item.h}}</view><image src="/static/shopCarIc/add.png" mode="" bindtap="{{item.i}}"></image></view></view></view></view><view class="" style="height:120rpx"></view></view><view wx:else class="nullBox flexV"><image src="/static/shopCarIc/shopCarNull.png" mode=""></image> 购物车为空哦 </view><view wx:if="{{h}}" class="payBox flexJ"><view class="allIc flexA" bindtap="{{j}}"><image wx:if="{{i}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image><view class="">全选</view></view><view class="amountBox flexA"><view wx:if="{{k}}" class="settleBox flexA"><view class="settle">合计:</view><view class="money flexA"> ¥{{l}}</view></view><view class="btns flexC" bindtap="{{n}}">{{m}}</view></view></view></view>
\ No newline at end of file
<view class=""><u-navbar wx:if="{{a}}" u-i="73f0a715-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view wx:if="{{b}}" class="minBox"><view class="topBox flexJ"><view class="amount flexA" bindtap="{{d}}"><image src="/static/shopCarIc/shopAddress.png" mode=""></image><view class="adress ellipsis">{{c}}</view></view><view class="manage" bindtap="{{f}}">{{e}}</view></view><view wx:for="{{g}}" wx:for-item="item" wx:key="j" class="shopBox flexA"><view class="checkIc" catchtap="{{item.b}}"><image wx:if="{{item.a}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image></view><view class="shopPhoto"><image src="{{item.c}}" mode=""></image><image wx:if="{{item.d}}" class="shopStatus" src="/static/shopCarIc/shopType.png" mode=""></image></view><view class="infoBox"><view class="title ellipsis">{{item.e}}</view><view class="numBox flexJ"><view class="rightTitle flexA"><text>¥</text> {{item.f}}</view><view class="and flexA"><image src="/static/shopCarIc/reduce.png" mode="" bindtap="{{item.g}}"></image><view class="num flexC">{{item.h}}</view><image src="/static/shopCarIc/add.png" mode="" bindtap="{{item.i}}"></image></view></view></view></view><view class="" style="height:120rpx"></view></view><view wx:else class="nullBox flexV"><image src="/static/shopCarIc/shopCarNull.png" mode=""></image> 购物车为空哦 </view><view wx:if="{{h}}" class="payBox flexJ"><view class="allIc flexA" bindtap="{{j}}"><image wx:if="{{i}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/checked.png" mode=""></image><view class="">全选</view></view><view class="amountBox flexA"><view wx:if="{{k}}" class="settleBox flexA"><view class="settle">合计:</view><view class="money flexA">¥{{l}}</view></view><view class="btns flexC" bindtap="{{n}}">{{m}}</view></view></view></view>
\ No newline at end of file
... ...
... ... @@ -28,7 +28,7 @@
display: none !important;
}
page {
background: #F6F8FA;
background: #f6f8fa;
}
.minBox {
width: 100%;
... ... @@ -100,7 +100,7 @@ page {
font-size: 28rpx;
}
.minBox .shopBox .infoBox .numBox .rightTitle {
color: #F33F2E;
color: #f33f2e;
font-size: 40rpx;
font-weight: 700;
}
... ... @@ -166,7 +166,7 @@ page {
}
.nullBox {
margin-top: 266rpx;
color: #C6C5C8;
color: #c6c5c8;
font-size: 28rpx;
}
.nullBox image {
... ...