<view v-if="item.type === 10" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'"> | <view v-if="item.type === 10" style="width: 100%" :class="item.bg ? 'bg' : 'notbg'"> | ||||
<view class="as-layout-horizontal" style="align-items: center"> | <view class="as-layout-horizontal" style="align-items: center"> | ||||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region"> | |||||
<picker mode="region" @change="handleGetRegion($event, item)" :value="item.region" | |||||
disabled> | |||||
<view class="uni-input"> | <view class="uni-input"> | ||||
{{item.region?item.region[0]+item.region[1]+item.region[2]:""}} | {{item.region?item.region[0]+item.region[1]+item.region[2]:""}} | ||||
</view> | </view> | ||||
</picker> | </picker> | ||||
<image class="arror" v-if="state.sysType == 'WECHAT'" | |||||
<!-- <image class="arror" v-if="state.sysType == 'WECHAT'" | |||||
:src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"> | ||||
</image> | |||||
</image> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
let newMsg = data.title.replace(reg, ""); | let newMsg = data.title.replace(reg, ""); | ||||
if (data.value.indexOf(",") != -1 && data.type === 8) { | if (data.value.indexOf(",") != -1 && data.type === 8) { | ||||
if (!data[data.value.split(",")[0]]) { | if (!data[data.value.split(",")[0]]) { | ||||
console.log("1111") | |||||
showToast(data.emptyHint ? data.emptyHint : `${data.hint1}不能为空`); | showToast(data.emptyHint ? data.emptyHint : `${data.hint1}不能为空`); | ||||
return; | return; | ||||
} else if (!data[data.value.split(",")[1]]) { | } else if (!data[data.value.split(",")[1]]) { | ||||
console.log("2222") | |||||
showToast(data.emptyHint ? data.emptyHint : `${data.hint2}不能为空`); | showToast(data.emptyHint ? data.emptyHint : `${data.hint2}不能为空`); | ||||
return; | return; | ||||
} | } | ||||
} else if (!data[data.value]) { | } else if (!data[data.value]) { | ||||
console.log("3333", data[data.value], data) | |||||
showToast(data.emptyHint ? data.emptyHint : `${newMsg}不能为空`); | showToast(data.emptyHint ? data.emptyHint : `${newMsg}不能为空`); | ||||
return; | return; | ||||
} | } |
"subPackages": [{ | "subPackages": [{ | ||||
"root": "subpackage/after-sale", //售后相关 | "root": "subpackage/after-sale", //售后相关 | ||||
"pages": [{ | "pages": [{ | ||||
"path": "add-equity/add-equity", | |||||
"style": { | |||||
"navigationBarTitleText": "加购权益", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "ETC-product-status-list-query/ETC-product-status-list-query", | "path": "ETC-product-status-list-query/ETC-product-status-list-query", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "ETC产品状态名单", | "navigationBarTitleText": "ETC产品状态名单", |
<template> | |||||
<view class="content"> | |||||
<!-- <view class="item" v-for="(item,index) in state.list" :key='index'> --> | |||||
<view class="item"> | |||||
<view class="title"> | |||||
<view> | |||||
<!-- <text><text>{{item.productName}}</text> <text>¥{{item.discountPrice * 0.01}}</text></text> --> | |||||
<text><text>111</text> <text>¥11</text></text> | |||||
</view> | |||||
<text class="add">加购</text> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { onLoad, onShow } from "@dcloudio/uni-app"; | |||||
import { reactive } from "vue"; | |||||
import { equityProductsApi } from "@/utils/network/api.js"; | |||||
import { stringToJson } from "@/utils/network/encryption"; | |||||
import { request } from "@/utils/network/request"; | |||||
import { etcQYAction } from "@/utils/network/api.js"; | |||||
import { fileURL } from "@/datas/fileURL.js"; | |||||
import navBar from "@/components/nav-bar/nav-bar2.vue"; | |||||
import navBgCar from "./components/nav-bg-car4"; | |||||
// import { setItem } from "@/utils/storage"; | |||||
import { msg } from "@/utils/utils"; | |||||
import { | |||||
checkOrderStatus, | |||||
wechatAppID, | |||||
wechatPayConfigId, | |||||
wechatSecret, | |||||
addProduct, | |||||
queryDetails, | |||||
getOpenidApi | |||||
} from "@/utils/network/api"; | |||||
import { | |||||
getItem, | |||||
StorageKeys, | |||||
setItem | |||||
} from "@/utils/storage"; | |||||
const imgURL = `${fileURL}image/`; | |||||
const state = reactive({ | |||||
list: [], //权益数据 | |||||
}) | |||||
onLoad((option : any) => { | |||||
// getList(); | |||||
console.log("option", option) | |||||
}) | |||||
const getList = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
"promoteId": state.promoteId, | |||||
}, | |||||
method: 'POST', | |||||
showLoading: true, | |||||
} | |||||
request(equityProductsApi, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
state.list = data.data | |||||
console.log("222", data.data) | |||||
}) | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
.content { | |||||
width: 100%; | |||||
} | |||||
.item { | |||||
width: 90%; | |||||
margin: 20rpx auto; | |||||
background-color: rgb(41, 199, 207); | |||||
border-radius: 20rpx; | |||||
padding: 20rpx; | |||||
box-sizing: border-box; | |||||
color: white; | |||||
font-size: 32rpx; | |||||
} | |||||
.item>.title { | |||||
width: 100%; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | |||||
.add { | |||||
background: white; | |||||
border-radius: 10rpx; | |||||
padding: 4rpx 6rpx; | |||||
color: #000; | |||||
} | |||||
</style> |
//去连接蓝牙 | //去连接蓝牙 | ||||
const toPage = () => { | const toPage = () => { | ||||
console.log("getCurrentPages()", getCurrentPages()) | |||||
navTo("/pages/bluetooth/bluetooth?routeType=5"); //去连接蓝牙 | navTo("/pages/bluetooth/bluetooth?routeType=5"); //去连接蓝牙 | ||||
}; | }; | ||||
title: "换货方式:", | title: "换货方式:", | ||||
type: 7, | type: 7, | ||||
value: "exchangeMode", | value: "exchangeMode", | ||||
exchangeMode: "ON_LINE", | |||||
star: true, | star: true, | ||||
required: true, | required: true, | ||||
divider: true, | divider: true, | ||||
emptyHint: "请选择换货方式", | emptyHint: "请选择换货方式", | ||||
itemData: [ | itemData: [ | ||||
{ | { | ||||
checked: false, | |||||
checked: true, | |||||
value: "ON_LINE", | value: "ON_LINE", | ||||
name: "线上", | name: "线上", | ||||
}, | }, | ||||
} | } | ||||
if (state.exchangeMode === "MAIL") { | if (state.exchangeMode === "MAIL") { | ||||
//MAIL-线上-邮寄 | //MAIL-线上-邮寄 | ||||
for (let i = 8; i < 14; i++) { | |||||
for (let i = 9; i < 14; i++) { | |||||
state.formData[i].hide = false; | state.formData[i].hide = false; | ||||
} | } | ||||
// #ifdef MP-ALIPAY | // #ifdef MP-ALIPAY |
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&totalAmount=${state.totalAmount}&equityId=${item.equityId}`, | url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&totalAmount=${state.totalAmount}&equityId=${item.equityId}`, | ||||
}); | }); | ||||
return; | |||||
state.choiceValueComplete = []; | |||||
for (var i = 0; i < state.choiceValue.length; i++) { | |||||
state.choiceValueComplete.push(state.list[state.choiceValue[i]]) | |||||
} | |||||
let items = encodeURIComponent(JSON.stringify(state.choiceValueComplete)); | |||||
console.log("state.openid", state); | |||||
const data = JSON.parse(decodeURIComponent(items)); | |||||
let productId = []; | |||||
state.productMoney = 0; | |||||
for (var i = 0; i < data.length; i++) { | |||||
data['isOpened'] = 'node'; | |||||
state.productMoney += data[i]['discountPrice'] / 100; | |||||
productId.push(data[i]['equityId']) | |||||
} | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
console.log("options", options); | |||||
request(queryDetails, options).then((res) => { | |||||
state.detailsObj = stringToJson(res.bizContent); | |||||
console.log("state.detailsObj", state.detailsObj) | |||||
let allMoney = (parseFloat(state.detailsObj.product.oncePrice * 0.01) + parseFloat(state.productMoney)).toFixed(2) | |||||
const optionss = { | |||||
type: 2, | |||||
data: { | |||||
orderId: state.orderId, //订单编号 | |||||
openId: getItem(StorageKeys.OpenId), //操作人 id | |||||
equityId: productId.toString(), //权益Id | |||||
totalAmount: allMoney * 100, //总金额 | |||||
isRepeatPurchase: 0 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
console.log("optionss", optionss); | |||||
request(addProduct, optionss).then((res) => { | |||||
// uni.redirectTo({ | |||||
// url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}&&isValueCard=${state.detailsObj.isValueCard}`, | |||||
// }); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}`, | |||||
}); | |||||
}); | |||||
}); | |||||
} | } | ||||
</view> | </view> | ||||
<view class="time">{{item.insertTime}}</view> | <view class="time">{{item.insertTime}}</view> | ||||
</view> | </view> | ||||
<view class="center"> | <view class="center"> | ||||
<!-- <view class="type">这里是业务办理</view> --> | <!-- <view class="type">这里是业务办理</view> --> | ||||
<view class="content">{{item.suggestion}}</view> | <view class="content">{{item.suggestion}}</view> | ||||
</view> | </view> | ||||
<view class="bottom"> | <view class="bottom"> | ||||
<view class="text good" v-if="item.evaluate === '好评'">好评</view> | <view class="text good" v-if="item.evaluate === '好评'">好评</view> | ||||
<view class="text middle" v-if="item.evaluate === '中评'">中评</view> | <view class="text middle" v-if="item.evaluate === '中评'">中评</view> | ||||
<view class="score">{{item.score}}分</view> | <view class="score">{{item.score}}分</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view v-if="dataList.length==0" class="no">暂无评价</view> | |||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
defineProps({ | defineProps({ | ||||
//数据列表 | //数据列表 | ||||
dataList:{ | |||||
type:Array, | |||||
default:()=>{ | |||||
dataList: { | |||||
type: Array, | |||||
default: () => { | |||||
return []; | return []; | ||||
} | } | ||||
} | } | ||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.item-box{ | |||||
.item-box { | |||||
background: #ffffff; | background: #ffffff; | ||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223,223,223,0.8); | |||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); | |||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
margin-bottom: 30rpx; | margin-bottom: 30rpx; | ||||
.top{ | |||||
.top { | |||||
min-height: 88rpx; | min-height: 88rpx; | ||||
padding: 0rpx 30rpx; | padding: 0rpx 30rpx; | ||||
border-bottom: 1rpx solid #DCDCDC; | border-bottom: 1rpx solid #DCDCDC; | ||||
image{ | |||||
image { | |||||
width: 50rpx; | width: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
background: #B2EEE1; | background: #B2EEE1; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
} | } | ||||
text{ | |||||
text { | |||||
margin-left: 20rpx; | margin-left: 20rpx; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
font-family: Noto Sans S Chinese; | font-family: Noto Sans S Chinese; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: #333333; | color: #333333; | ||||
} | } | ||||
.time{ | |||||
.time { | |||||
font-size: 26rpx; | font-size: 26rpx; | ||||
color: #333333; | color: #333333; | ||||
text-align: right; | text-align: right; | ||||
} | } | ||||
} | } | ||||
.center{ | |||||
.center { | |||||
padding: 28rpx 30rpx; | padding: 28rpx 30rpx; | ||||
border-bottom: 1rpx solid #DCDCDC; | border-bottom: 1rpx solid #DCDCDC; | ||||
.type{ | |||||
.type { | |||||
font-size: 26rpx; | font-size: 26rpx; | ||||
font-family: Noto Sans S Chinese; | font-family: Noto Sans S Chinese; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: #999999; | color: #999999; | ||||
} | } | ||||
.content{ | |||||
.content { | |||||
ffont-size: 26rpx; | ffont-size: 26rpx; | ||||
font-family: Noto Sans S Chinese; | font-family: Noto Sans S Chinese; | ||||
font-weight: 400; | font-weight: 400; | ||||
margin-top: 30rpx; | margin-top: 30rpx; | ||||
} | } | ||||
} | } | ||||
.bottom{ | |||||
.bottom { | |||||
padding: 15rpx 30rpx; | padding: 15rpx 30rpx; | ||||
text-align: right; | text-align: right; | ||||
display: flex; | display: flex; | ||||
justify-content: flex-end; | justify-content: flex-end; | ||||
align-items: center; | align-items: center; | ||||
.text{ | |||||
.text { | |||||
width: 97rpx; | width: 97rpx; | ||||
height: 36rpx; | height: 36rpx; | ||||
line-height: 36rpx; | line-height: 36rpx; | ||||
font-size: 26rpx; | font-size: 26rpx; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.good{ | |||||
.good { | |||||
background: #FBD9D0; | background: #FBD9D0; | ||||
color: #DD523E; | color: #DD523E; | ||||
} | } | ||||
.middle{ | |||||
.middle { | |||||
background: #FBECD0; | background: #FBECD0; | ||||
color: #FF9600; | color: #FF9600; | ||||
} | } | ||||
.bad{ | |||||
.bad { | |||||
background: #E1E1E1; | background: #E1E1E1; | ||||
color: #999999; | color: #999999; | ||||
} | } | ||||
.score{ | |||||
.score { | |||||
font-size: 26rpx; | font-size: 26rpx; | ||||
font-family: Noto Sans S Chinese; | font-family: Noto Sans S Chinese; | ||||
font-weight: 400; | font-weight: 400; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.no { | |||||
text-align: center; | |||||
} | |||||
</style> | </style> |
"opId": getItem(StorageKeys.OpenId), | "opId": getItem(StorageKeys.OpenId), | ||||
"pageNo": state.pageNo, | "pageNo": state.pageNo, | ||||
"pageSize": state.pageSize, | "pageSize": state.pageSize, | ||||
"loginSource": getItem("loginSource") | |||||
}, | }, | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
} else { | } else { | ||||
state.dataList = [] | state.dataList = [] | ||||
} | } | ||||
console.log("stringToJson(res.bizContent)2", state.dataList) | |||||
console.log("stringToJson(res.bizContent)21", state.dataList) | |||||
}) | }) | ||||
}; | }; |