//根据订单类型 跳转到不同的订单详情页面 | //根据订单类型 跳转到不同的订单详情页面 | ||||
const gotoOrderDetails = (orderInfo) => { | const gotoOrderDetails = (orderInfo) => { | ||||
console.log('输出内容=====',orderInfo.orderType) | |||||
if (orderInfo.orderType === 'ISSUE') { | if (orderInfo.orderType === 'ISSUE') { | ||||
navTo(`/subpackage/orders/order-details-new?id=${orderInfo.id}&appraise=${orderInfo.appraise}`); | navTo(`/subpackage/orders/order-details-new?id=${orderInfo.id}&appraise=${orderInfo.appraise}`); | ||||
} else if (orderInfo.orderType == OrderTypes.同时换卡换签 || orderInfo.orderType == 'REPLACEMENT_CARD' || orderInfo.orderType == 'REPLACEMENT_SIGNATURE') { | |||||
} else if (orderInfo.orderType == OrderTypes.同时换卡换签 || | |||||
orderInfo.orderType == 'REPLACEMENT_CARD' || orderInfo.orderType == 'REPLACEMENT_SIGNATURE') { | |||||
navTo(`/subpackage/orders/order-details-card-sign?id=${orderInfo.id}&orType=${orderInfo.orderType}`); | navTo(`/subpackage/orders/order-details-card-sign?id=${orderInfo.id}&orType=${orderInfo.orderType}`); | ||||
} else if (orderInfo.orderType === 'SUPPLEMENT_OBU') { | } else if (orderInfo.orderType === 'SUPPLEMENT_OBU') { |
<swiper class="swiper" circular :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" | <swiper class="swiper" circular :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" | ||||
:interval="swiper.interval" :duration="swiper.duration" indicator-active-color="rgba(0, 179, 139, 1)" | :interval="swiper.interval" :duration="swiper.duration" indicator-active-color="rgba(0, 179, 139, 1)" | ||||
:easing-function="swiper.easing"> | :easing-function="swiper.easing"> | ||||
<block v-if="state.swiperList.length >0" v-for="item in state.swiperList" | |||||
:key="item.id" > | |||||
<swiper-item class="swiper-item" @click="gotoLink(item)" > | |||||
<image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'" mode="widthFix"></image> | |||||
<block v-if="state.swiperList.length >0" v-for="item in state.swiperList" :key="item.id"> | |||||
<swiper-item class="swiper-item" @click="gotoLink(item)"> | |||||
<image :src="item.imgUrl?strReplace(item.imgUrl):fileURL + 'image/index/banner-1.png'" | |||||
mode="widthFix"></image> | |||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
<block v-else><swiper-item class="swiper-item"> | |||||
<block v-else> | |||||
<swiper-item class="swiper-item"> | |||||
<image :src="fileURL + 'image/index/banner-1.png'" mode="widthFix"></image> | <image :src="fileURL + 'image/index/banner-1.png'" mode="widthFix"></image> | ||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
<view class="text">设备遗失</view> | <view class="text">设备遗失</view> | ||||
</view> | </view> | ||||
<!-- <view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> --> | <!-- <view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> --> | ||||
<view class="item-box" @click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> | |||||
<view class="item-box" | |||||
@click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> | |||||
<view class="item item-6"> | <view class="item item-6"> | ||||
<image :src="fileURL + 'image/index/item-6.png'" /> | <image :src="fileURL + 'image/index/item-6.png'" /> | ||||
</view> | </view> | ||||
<view class="express-lane"> | <view class="express-lane"> | ||||
<view class="title">快速办理通道</view> | <view class="title">快速办理通道</view> | ||||
<view class="lane"> | <view class="lane"> | ||||
<view class="lane-item lane-1" :style="{ '--background': bgOrange }" @click="showMask(0)"> | |||||
<view class="lane-item lane-1" :style="{ '--background': bgOrange }" @click="showMask(1)"> | |||||
<image :src="fileURL + 'image/index/icon-car.png'"></image> | <image :src="fileURL + 'image/index/icon-car.png'"></image> | ||||
<view class="text"> | <view class="text"> | ||||
<text class="head">客车通道</text> | <text class="head">客车通道</text> | ||||
<text class="decribe">业务内容简介</text> | <text class="decribe">业务内容简介</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="lane-item lane-2" :style="{ '--background': bgBlue }" @click="showMask(1)"> | |||||
<view class="lane-item lane-2" :style="{ '--background': bgBlue }" @click="showMask(2)"> | |||||
<image :src="fileURL + 'image/index/icon-truck.png'"></image> | <image :src="fileURL + 'image/index/icon-truck.png'"></image> | ||||
<view class="text"> | <view class="text"> | ||||
<text class="head">货车通道</text> | <text class="head">货车通道</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
navTo, | navTo, | ||||
confirm | confirm | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; | const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; | ||||
const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; | const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; | ||||
const list = reactive(["您有一条待办事项,还未办理完成"]) | const list = reactive(["您有一条待办事项,还未办理完成"]) | ||||
easing: "easeInOutCubic" | easing: "easeInOutCubic" | ||||
}) | }) | ||||
const state = reactive({ | const state = reactive({ | ||||
type: 0,//0客车 1货车 | |||||
userType: 1,//1个人 2单位 | |||||
type: 0, //0客车 1货车 | |||||
userType: 1, //1个人 2单位 | |||||
notice: "", | notice: "", | ||||
swiperList: [], | swiperList: [], | ||||
noticeList: [ | noticeList: [ | ||||
}); | }); | ||||
onLoad(() => { | onLoad(() => { | ||||
getInfo() | getInfo() | ||||
quanKeyAction().then((val : any) => { | |||||
quanKeyAction().then((val: any) => { | |||||
setItem('key', val.dictTypeAndItem) | setItem('key', val.dictTypeAndItem) | ||||
}) | }) | ||||
}) | }) | ||||
onMounted(() => { | onMounted(() => { | ||||
uni.getSystemInfo({ | uni.getSystemInfo({ | ||||
success: (e : any) => { | |||||
success: (e: any) => { | |||||
// console.log(e.statusBarHeight); | // console.log(e.statusBarHeight); | ||||
statusBarHeight.value = e.statusBarHeight; | statusBarHeight.value = e.statusBarHeight; | ||||
} | } | ||||
//调用方式 | //调用方式 | ||||
request(querySwiper, options).then((res) => { | request(querySwiper, options).then((res) => { | ||||
console.log(stringToJson(res.bizContent)); | |||||
const data = stringToJson(res.bizContent) | |||||
state.swiperList = data.swipers ?? [] | |||||
}) | |||||
console.log(stringToJson(res.bizContent)); | |||||
const data = stringToJson(res.bizContent) | |||||
state.swiperList = data.swipers ?? [] | |||||
}) | |||||
.catch((err) => { | .catch((err) => { | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
}; | }; | ||||
//轮播跳转 | //轮播跳转 | ||||
const gotoLink = (item:any) => { | |||||
console.log("555555555555555555",item); | |||||
const gotoLink = (item: any) => { | |||||
console.log("555555555555555555", item); | |||||
}; | }; | ||||
//办理流程tab选择 | //办理流程tab选择 | ||||
}; | }; | ||||
//全量枚举值查询 | //全量枚举值查询 | ||||
const quanKeyAction = (val : any) => { | |||||
const quanKeyAction = (val: any) => { | |||||
var data = { | var data = { | ||||
}; | }; | ||||
} | } | ||||
const toCreatOrder = (val : number) => { | |||||
console.log(typeof (val)); | |||||
const toCreatOrder = (val: number) => { | |||||
console.log(typeof(val)); | |||||
state.userType = val; | state.userType = val; | ||||
// if (val === 1) { | // if (val === 1) { | ||||
// // navTo(`/applyCard/essential-information?type=${state.type}&&userType=${state.userType}`) | // // navTo(`/applyCard/essential-information?type=${state.type}&&userType=${state.userType}`) | ||||
closeMask(); | closeMask(); | ||||
}; | }; | ||||
const showMask = (val : any) => { | |||||
state.type = val;//0 客车 1货车 | |||||
const showMask = (val: any) => { | |||||
state.type = val; //1 客车 2货车 | |||||
isShowMask.value = true; | isShowMask.value = true; | ||||
}; | }; | ||||
console.log(err); | console.log(err); | ||||
}); | }); | ||||
} | } | ||||
//替换图片地址 | //替换图片地址 | ||||
const strReplace = (str : string) => { | |||||
const strReplace = (str: string) => { | |||||
return str.replace('192.168.100.63:8087', envs[process.env.NODE_ENV].baseUrl) | return str.replace('192.168.100.63:8087', envs[process.env.NODE_ENV].baseUrl) | ||||
} | } | ||||
</script> | </script> | ||||
padding: 55rpx 30rpx 30rpx; | padding: 55rpx 30rpx 30rpx; | ||||
} | } | ||||
} | } | ||||
</style> | |||||
</style> |
<!-- 单位账户充值开户订单 --> | <!-- 单位账户充值开户订单 --> | ||||
<order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" /> | <order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" /> | ||||
</block> | </block> | ||||
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" v-if="ordersList.length > 0"/> | |||||
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" | |||||
v-if="ordersList.length > 0"/> | |||||
</template> | </template> | ||||
</template> | </template> | ||||
<u-input v-model="state.form.userName" placeholder='请输入姓名' /> | <u-input v-model="state.form.userName" placeholder='请输入姓名' /> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="性别"> | |||||
<!-- <u-form-item label="性别"> | |||||
<u-input placeholder='请选择性别' v-model="state.form.gender" @click="userGenderAction()" | <u-input placeholder='请选择性别' v-model="state.form.gender" @click="userGenderAction()" | ||||
type="select" /> | type="select" /> | ||||
</u-form-item> | |||||
</u-form-item> --> | |||||
<u-form-item label="身份证号"> | <u-form-item label="身份证号"> | ||||
<u-input placeholder='请输入身份证' type="idcard" v-model="state.form.userIdNum" /> | <u-input placeholder='请输入身份证' type="idcard" v-model="state.form.userIdNum" /> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="姓名"> | <u-form-item label="姓名"> | ||||
<u-input inputAlign="right" placeholder='请输入姓名' v-model="state.form.userName" /> | <u-input inputAlign="right" placeholder='请输入姓名' v-model="state.form.userName" /> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="性别"> | |||||
<!-- <u-form-item label="性别"> | |||||
<u-input inputAlign="right" placeholder='请选择性别' v-model="state.form.gender" type="select" /> | <u-input inputAlign="right" placeholder='请选择性别' v-model="state.form.gender" type="select" /> | ||||
</u-form-item> | |||||
</u-form-item> --> | |||||
<u-form-item label="身份证号"> | <u-form-item label="身份证号"> | ||||
<u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.userIdNum" /> | <u-input inputAlign="right" placeholder='请输入身份证号' v-model="state.form.userIdNum" /> | ||||
</u-form-item> | </u-form-item> |
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 加购权益列表 --> | |||||
加购权益列表 | |||||
<view class="add_all"> | <view class="add_all"> | ||||
<uni-swipe-action> | <uni-swipe-action> | ||||
<uni-swipe-action-item | |||||
class="del_item" | |||||
v-for="(item,index) in state.list" | |||||
:right-options="state.options2" | |||||
:show="item.isOpened" | |||||
:auto-close="false" | |||||
@change="change" | |||||
@click="bindClick(index)" | |||||
> | |||||
<uni-swipe-action-item class="del_item" v-for="(item,index) in state.list" | |||||
:right-options="state.options2" :show="item.isOpened" :auto-close="false" @change="change" | |||||
@click="bindClick(index)"> | |||||
<view class="content-box"> | <view class="content-box"> | ||||
<view v-if='item.children' style="display: inline-block;"> | <view v-if='item.children' style="display: inline-block;"> | ||||
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" src="../../static/image/icon-back.png" alt="" srcset=""></image> | |||||
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" | |||||
src="../../static/image/icon-back.png" alt="" srcset=""></image> | |||||
</view> | |||||
<text class="content-text" @tap="setOpened">{{item.productName}} | |||||
¥{{item.discountPrice * 0.01}}</text> | |||||
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" | |||||
:key='index'> | |||||
<view> | |||||
<text>{{itemChild.productName}}</text> <text>{{itemChild.discountPrice * 0.01}}</text> | |||||
</view> | |||||
</view> | </view> | ||||
<text class="content-text" @tap="setOpened">{{item.productName}} ¥{{item.discountPrice * 0.01}}</text> | |||||
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" :key='index'> | |||||
<view><text>{{itemChild.productName}}</text> <text>{{itemChild.discountPrice * 0.01}}</text></view> | |||||
</view> | |||||
</view> | </view> | ||||
</uni-swipe-action-item> | </uni-swipe-action-item> | ||||
</uni-swipe-action> | </uni-swipe-action> | ||||
</view> | </view> | ||||
<view class="value-wrapper"> | <view class="value-wrapper"> | ||||
<view class="flex"> | <view class="flex"> | ||||
<view class="title"> 产品金额 </view> | <view class="title"> 产品金额 </view> | ||||
<view class="value"> | <view class="value"> | ||||
{{ "¥" + state.clientFee }} | |||||
{{ "¥" + state.detailsObj.product.oncePrice * 0.01 }} | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="flex"> | <view class="flex"> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="action"> | <view class="action"> | ||||
<button type="default" class="button" @click="savaHandle()"> | <button type="default" class="button" @click="savaHandle()"> | ||||
{{ "确认办理:¥" + state.allMoney }} | {{ "确认办理:¥" + state.allMoney }} | ||||
</button> | </button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
onShow | onShow | ||||
} from "@dcloudio/uni-app"; | } from "@dcloudio/uni-app"; | ||||
import { | import { | ||||
reactive,ref | |||||
reactive, | |||||
ref | |||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
etcQueryProduct,addProduct | |||||
etcQueryProduct, | |||||
addProduct | |||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
import { | import { | ||||
request | request | ||||
msg | msg | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
const imgURL = `${fileURL}image/`; | const imgURL = `${fileURL}image/`; | ||||
const savaHandle = () => { | const savaHandle = () => { | ||||
console.log("state.productId.length",state.productId.length) | |||||
if(state.productId.length>0){ | |||||
console.log("state.productId.length", state.productId.length) | |||||
//判断是否有加购权益 | |||||
if (state.productId.length > 0) { | |||||
queryAddProduct(); | queryAddProduct(); | ||||
uni.showModal({ | |||||
// title: '提示', | |||||
content: '确定支付', | |||||
success: function (res) { | |||||
if (res.confirm) { | |||||
console.log('用户点击确定'); | |||||
wxPayment(); | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消'); | |||||
} | |||||
} | |||||
uni.showModal({ | |||||
// title: '提示', | |||||
content: '确定支付', | |||||
success: function(res) { | |||||
if (res.confirm) { | |||||
console.log('用户点击确定'); | |||||
wxPayment(); | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消'); | |||||
} | } | ||||
}); | |||||
}else{ | |||||
wxPayment(); | |||||
} | |||||
} | |||||
}); | |||||
// msg("确定绑定权益产品"); | // msg("确定绑定权益产品"); | ||||
// wxPayment(); | // wxPayment(); | ||||
}; | }; | ||||
url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | ||||
success: (res: any) => { | success: (res: any) => { | ||||
state.openid = res.data.openid; | state.openid = res.data.openid; | ||||
console.log("state.openid",state.openid); | |||||
console.log("state.openid", state.openid); | |||||
}, | }, | ||||
}); | }); | ||||
}, | }, | ||||
checkOrder(); | checkOrder(); | ||||
}, | }, | ||||
fail: function(err) { | fail: function(err) { | ||||
checkOrder(); | |||||
// checkOrder(); | |||||
confirm(err, () => {}, "支付失败", false); | confirm(err, () => {}, "支付失败", false); | ||||
}, | }, | ||||
}); | }); | ||||
}; | }; | ||||
onLoad((option: any) => { | onLoad((option: any) => { | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.clientFee = option.clientFee / 100; | |||||
// state.clientFee = option.clientFee / 100; | |||||
state.id = option.id; | state.id = option.id; | ||||
getOpenID(); | getOpenID(); | ||||
const data=JSON.parse(decodeURIComponent(option.data)); | |||||
for(var i=0;i<data.length;i++){ | |||||
data['isOpened']='node'; | |||||
state.productMoney+=data[i]['discountPrice'] / 100; | |||||
const data = JSON.parse(decodeURIComponent(option.data)); | |||||
for (var i = 0; i < data.length; i++) { | |||||
data['isOpened'] = 'node'; | |||||
state.productMoney += data[i]['discountPrice'] / 100; | |||||
state.productId.push(data[i]['equityId']) | state.productId.push(data[i]['equityId']) | ||||
} | } | ||||
state.allMoney=(state.productMoney+state.clientFee).toFixed(2) | |||||
state.list=data; | |||||
console.log("data",option) | |||||
console.log("数组",JSON.parse(decodeURIComponent(option.data))) | |||||
queryDetailsData(); | |||||
state.list = data; | |||||
queryDetailsData(); | |||||
}); | }); | ||||
const state = reactive({ | const state = reactive({ | ||||
clientFee: undefined, | clientFee: undefined, | ||||
id: "", | id: "", | ||||
options2: [{ | options2: [{ | ||||
text: '删除', | |||||
style: { | |||||
backgroundColor: '#F56C6C' | |||||
} | |||||
text: '删除', | |||||
style: { | |||||
backgroundColor: '#F56C6C' | |||||
} | } | ||||
], | |||||
}], | |||||
isOpened: 'none', | isOpened: 'none', | ||||
list:[], | |||||
productMoney:0, | |||||
allMoney:0, | |||||
productId:[], | |||||
list: [], | |||||
productMoney: 0, | |||||
allMoney: 0, | |||||
productId: [], | |||||
// 弹框 | // 弹框 | ||||
type: 'center', | type: 'center', | ||||
msgType: 'success', | msgType: 'success', | ||||
messageText: '这是一条成功提示', | messageText: '这是一条成功提示', | ||||
value: '', | value: '', | ||||
detailsObj:'', | |||||
detailsObj: '', | |||||
}); | }); | ||||
const bindClick=(i)=>{ | |||||
const bindClick = (i) => { | |||||
console.log(i); | console.log(i); | ||||
uni.showToast({ | uni.showToast({ | ||||
title: "删除成功", | title: "删除成功", | ||||
icon: 'none' | icon: 'none' | ||||
}); | }); | ||||
state.list.splice(i,1); | |||||
state.productMoney=0; | |||||
state.productId=[]; | |||||
for(var k=0;k<state.list.length;k++){ | |||||
state.productMoney+=state.list[k]['discountPrice'] / 100 | |||||
state.list.splice(i, 1); | |||||
state.productMoney = 0; | |||||
state.productId = []; | |||||
for (var k = 0; k < state.list.length; k++) { | |||||
state.productMoney += state.list[k]['discountPrice'] / 100 | |||||
state.productId.push(state.list[k]['equityId']) | state.productId.push(state.list[k]['equityId']) | ||||
} | } | ||||
state.allMoney=(state.productMoney+state.clientFee).toFixed(2) | |||||
console.log("state.productId",state.productId) | |||||
state.allMoney = (state.productMoney + state.clientFee).toFixed(2) | |||||
console.log("state.productId", state.productId) | |||||
}; | }; | ||||
const setOpened=()=> { | |||||
if (state.isOpened === 'none') { | |||||
state.isOpened = 'right'; | |||||
return; | |||||
} | |||||
if (state.isOpened === 'left') { | |||||
state.isOpened = 'right'; | |||||
return; | |||||
} | |||||
if (state.isOpened === 'right') { | |||||
state.isOpened = 'none'; | |||||
return; | |||||
} | |||||
} | |||||
const change=(e)=> { | |||||
state.isOpened = e; | |||||
console.log('返回:', e); | |||||
} | |||||
// 加购权益产品接口 | |||||
const queryAddProduct=()=>{ | |||||
console.log("state.openid",state.openid); | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
openId: state.openid, //操作人 id | |||||
equityId: state.productId.toString() , //权益Id | |||||
totalAmount: state.allMoney * 100, //总金额 | |||||
isRepeatPurchase:0 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(addProduct, options).then((res) => { | |||||
// msg("加购权益成功。"); | |||||
}); | |||||
const setOpened = () => { | |||||
if (state.isOpened === 'none') { | |||||
state.isOpened = 'right'; | |||||
return; | |||||
} | } | ||||
const changeIsShow = (index) =>{ | |||||
console.log(index,state.list[index]['isShow'],!state.list[index]['isShow']) | |||||
state.list[index]['isShow']=!state.list[index]['isShow'] | |||||
console.log("state.list",state.list) | |||||
if (state.isOpened === 'left') { | |||||
state.isOpened = 'right'; | |||||
return; | |||||
} | } | ||||
const queryDetailsData=()=>{ | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(queryDetails, options).then((res) => { | |||||
state.detailsObj=stringToJson(res.bizContent); | |||||
console.log("sdd",stringToJson(res.bizContent)) | |||||
}); | |||||
if (state.isOpened === 'right') { | |||||
state.isOpened = 'none'; | |||||
return; | |||||
} | } | ||||
} | |||||
const change = (e) => { | |||||
state.isOpened = e; | |||||
} | |||||
// 加购权益产品接口 | |||||
const queryAddProduct = () => { | |||||
console.log("state.openid", state.openid); | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
openId: state.openid, //操作人 id | |||||
equityId: state.productId.toString(), //权益Id | |||||
totalAmount: state.allMoney * 100, //总金额 | |||||
isRepeatPurchase: 0 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(addProduct, options).then((res) => {}); | |||||
} | |||||
const changeIsShow = (index) => { | |||||
console.log(index, state.list[index]['isShow'], !state.list[index]['isShow']) | |||||
state.list[index]['isShow'] = !state.list[index]['isShow'] | |||||
console.log("state.list", state.list) | |||||
} | |||||
const queryDetailsData = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(queryDetails, options).then((res) => { | |||||
state.detailsObj = stringToJson(res.bizContent); | |||||
state.allMoney = (parseFloat(state.detailsObj.product.oncePrice * 0.01) + parseFloat(state.productMoney)).toFixed(2) | |||||
}); | |||||
} | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.content { | .content { | ||||
width: 48%; | width: 48%; | ||||
.title { | .title { | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
font-family: Microsoft YaHei; | font-family: Microsoft YaHei; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.del_item{ | |||||
.del_item { | |||||
background-color: rgb(41, 199, 207) !important; | background-color: rgb(41, 199, 207) !important; | ||||
} | } | ||||
.content-box{ | |||||
.content-box { | |||||
background-color: rgb(41, 199, 207); | background-color: rgb(41, 199, 207); | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
color: white; | color: white; | ||||
padding: 20rpx; | padding: 20rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
} | } | ||||
::v-deep.uni-swipe_button-text{ | |||||
::v-deep.uni-swipe_button-text { | |||||
font-size: 30rpx !important; | font-size: 30rpx !important; | ||||
} | } | ||||
::v-deep.uni-swipe_button-group { | ::v-deep.uni-swipe_button-group { | ||||
font-size: 28rpx !important; | font-size: 28rpx !important; | ||||
} | } | ||||
.add_all{ | |||||
.add_all { | |||||
width: 95%; | width: 95%; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
} | } | ||||
.uni-swipe_box{ | |||||
.uni-swipe_box { | |||||
margin-bottom: 16rpx !important; | margin-bottom: 16rpx !important; | ||||
} | } | ||||
::v-deep.uni-swipe { | ::v-deep.uni-swipe { | ||||
margin-bottom: 16rpx !important; | margin-bottom: 16rpx !important; | ||||
} | } | ||||
.imageDefault{ | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(270deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
.imageDefault { | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(270deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
} | } | ||||
.imageChange{ | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(90deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
.imageChange { | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(90deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
} | } | ||||
.price{ | |||||
.price { | |||||
color: white; | color: white; | ||||
} | } | ||||
</style> | </style> |
<view class="btn-green" @click="gotoEditAddress(state.orderInfo)">修改地址</view> | <view class="btn-green" @click="gotoEditAddress(state.orderInfo)">修改地址</view> | ||||
</view> | </view> | ||||
<!-- 待支付 --> | <!-- 待支付 --> | ||||
<view v-if="state.orderInfo.orderStep == OrderStatus.待支付" class="btn-status"> | |||||
<view v-if="state.orderInfo.orderStep == OrderStatus.待支付1 || state.orderInfo.orderStep == OrderStatus.待支付2 || state.orderInfo.orderStep == OrderStatus.待支付3" class="btn-status"> | |||||
<view class="btn space" @click="gotoCancelOrder(state.orderInfo)">取消订单</view> | <view class="btn space" @click="gotoCancelOrder(state.orderInfo)">取消订单</view> | ||||
<view class="btn-green width-num-1" @click="gotoPay(state.orderInfo)">支付</view> | <view class="btn-green width-num-1" @click="gotoPay(state.orderInfo)">支付</view> | ||||
</view> | </view> |
export const envs = { | export const envs = { | ||||
//开发环境配置 | //开发环境配置 | ||||
development: { | development: { | ||||
// baseUrl: "192.168.100.63:8087", | |||||
baseUrl: "222.85.144.89:19002", | |||||
baseUrl: "192.168.100.63:8087", | |||||
// baseUrl: "222.85.144.89:19002", | |||||
}, | }, | ||||
//生产环境配置 | //生产环境配置 | ||||
production: { | production: { |