Просмотр исходного кода

[Feature]提交代码 签约

yxb
杨毅 2 лет назад
Родитель
Сommit
e45e98c4bb
5 измененных файлов: 254 добавлений и 240 удалений
  1. 236
    228
      applyCard/release-products.vue
  2. 1
    1
      manifest.json
  3. 3
    2
      pages/index/index.vue
  4. 12
    7
      pages/recharge/select-car.vue
  5. 2
    2
      utils/network/api.js

+ 236
- 228
applyCard/release-products.vue Просмотреть файл

@@ -1,229 +1,237 @@
<template>
<navBar title="支付账户签约"></navBar>
<navBgCar></navBgCar>
<view class="content-value">
<view
@click="qianyueAction(item)"
class="ul-item"
v-for="(item, index) in state.list"
:key="index"
>
<image
style="width: 100%; height: 170rpx; background-color: #eeeeee"
:src="item.bg"
></image>
<view class="item-value">
<image class="icon-tip" :src="item.icon"></image>
<view class="content">
<view class="title">
{{ item.title }}
</view>
<view style="margin-top: 15rpx" class="tip">
{{ item.tip }}
</view>
<view style="margin-top: 15rpx" class="flex">
<view :class="item.tag">
{{ item.tag1 }}
</view>
<view style="margin-left: 15rpx" :class="item.tag">
{{ item.tag2 }}
</view>
</view>
</view>
<view class="action-btn"> 签约 </view>
</view>
</view>
<!-- <view class="action">
<button type="default" class="button" @click="savaHandle()">
已有签约,跳过。
</button>
</view> -->
</view>
</template>

<script setup lang="ts">
import { onLoad, onShow } from "@dcloudio/uni-app";
import { reactive } from "vue";
import { etcQyList } from "@/utils/network/api.js";
import { request } from "@/utils/network/request.js";

import { stringToJson } from "@/utils/network/encryption";
import { fileURL } from "@/datas/fileURL.js";
import navBar from "../components/nav-bar/nav-bar2.vue";
import navBgCar from "./components/nav-bg-car5";
const imgURL = `${fileURL}image/`;

const savaHandle = () => {
console.log("执行点击事件");
uni.navigateTo({
url: `/applyCard/choice-product?orderId=${state.orderId}`,
});
};
const qianyueAction = (val) => {
console.log(val);
uni.navigateTo({
url: `/applyCard/sign-up?orderId=${state.orderId}`,
});
};
onLoad((option: any) => {
state.orderId = option.orderId;
var data = {};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
request(etcQyList, options).then((res) => {
const data = stringToJson(res.bizContent);
// state.list = data.data
state.list = [
{
bg: imgURL + "applyCard/product-bg.png",
icon: imgURL + "applyCard/wechat.png",
title: "微信支付",
tip: "服务费是每笔交易金额的0.05%",
tag1: "微信代付",
tag2: "微信便捷支付",
tag: "tag1",
channelId: data.data[0].channelId,
},
];
});
});

const state = reactive({
data: {
show: false,
src: imgURL + "applyCard/edit.png",
},
list: [
{
bg: imgURL + "applyCard/product-bg.png",
icon: imgURL + "applyCard/wechat.png",
title: "微信支付",
tip: "服务费是每笔交易金额的0.05%",
tag1: "微信代付",
tag2: "微信便捷支付",
tag: "tag1",
},
],
orderId: "",
});
</script>

<style lang="scss" scoped>
.content-value {
position: relative;
margin-top: -50rpx;
// padding: 0rpx 30rpx;
position: relative;
}

.flex {
display: flex;
align-items: center;
}

.action {
margin-top: 30rpx;
padding-left: 20rpx;
padding-right: 20rpx;
padding-bottom: 30rpx;

.button {
height: 80rpx;
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
border-radius: 40rpx;
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
line-height: 80rpx;
}
}

.action-btn {
margin-left: 45rpx;
width: 121rpx;
height: 61rpx;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 30rpx;
background: rgba(255, 255, 255, 0.2);

text-align: center;
font-size: 30rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
line-height: 61rpx;
}

.tag1 {
padding: 5rpx;
background: rgba(0, 179, 139, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}

.tag3 {
padding: 5rpx;
background: rgba(139, 112, 228, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}

.tag2 {
padding: 5rpx;
background: rgba(249, 97, 60, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}

.ul-item {
padding: 5px 20rpx;
display: flex;
align-items: center;

.item-value {
padding: 20rpx;
position: absolute;
display: flex;
align-items: center;
justify-content: space-around;

.content {
.title {
font-size: 32rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}

.tip {
font-size: 24rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
}
}

.icon-tip {
width: 100rpx;
height: 100rpx;
}

.content {
margin-left: 40rpx;
}
}
<template>
<navBar title="支付账户签约"></navBar>
<navBgCar></navBgCar>
<view class="content-value">
<view @click="qianyueAction(item)" class="ul-item" v-for="(item, index) in state.list" :key="index">
<image style="width: 100%; height: 170rpx; background-color: #eeeeee" :src="item.bg"></image>
<view class="item-value">
<image class="icon-tip" :src="item.icon"></image>
<view class="content">
<view class="title">
{{ item.title }}
</view>
<view style="margin-top: 15rpx" class="tip">
{{ item.tip }}
</view>
<view style="margin-top: 15rpx" class="flex">
<view :class="item.tag">
{{ item.tag1 }}
</view>
<view style="margin-left: 15rpx" :class="item.tag">
{{ item.tag2 }}
</view>
</view>
</view>
<view class="action-btn"> 签约 </view>
</view>
</view>
<!-- <view class="action">
<button type="default" class="button" @click="savaHandle()">
已有签约,跳过。
</button>
</view> -->
</view>
</template>
<script setup lang="ts">
import {
onLoad,
onShow
} from "@dcloudio/uni-app";
import {
reactive
} from "vue";
import {
etcQyList
} from "@/utils/network/api.js";
import {
request
} from "@/utils/network/request.js";
import {
stringToJson
} from "@/utils/network/encryption";
import {
fileURL
} from "@/datas/fileURL.js";
import navBar from "../components/nav-bar/nav-bar2.vue";
import navBgCar from "./components/nav-bg-car5";
const imgURL = `${fileURL}image/`;
const savaHandle = () => {
console.log("执行点击事件");
uni.navigateTo({
url: `/applyCard/choice-product?orderId=${state.orderId}`,
});
};
const qianyueAction = (val) => {
console.log(val);
uni.navigateTo({
url: `/applyCard/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`,
});
};
onLoad((option: any) => {
state.orderId = option.orderId;
state.clientFee = option.clientFee;
state.id = option.id;
state.data
var data = {};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
request(etcQyList, options).then((res) => {
const data = stringToJson(res.bizContent);
// state.list = data.data
state.list = [{
bg: imgURL + "applyCard/product-bg.png",
icon: imgURL + "applyCard/wechat.png",
title: "微信支付",
tip: "服务费是每笔交易金额的0.05%",
tag1: "微信代付",
tag2: "微信便捷支付",
tag: "tag1",
channelId: data.data[0].channelId,
}, ];
});
});
const state = reactive({
data: {
show: false,
src: imgURL + "applyCard/edit.png",
},
list: [{
bg: imgURL + "applyCard/product-bg.png",
icon: imgURL + "applyCard/wechat.png",
title: "微信支付",
tip: "服务费是每笔交易金额的0.05%",
tag1: "微信代付",
tag2: "微信便捷支付",
tag: "tag1",
}, ],
id: '',
clientFee: '',
orderId: "",
});
</script>
<style lang="scss" scoped>
.content-value {
position: relative;
margin-top: -50rpx;
// padding: 0rpx 30rpx;
position: relative;
}
.flex {
display: flex;
align-items: center;
}
.action {
margin-top: 30rpx;
padding-left: 20rpx;
padding-right: 20rpx;
padding-bottom: 30rpx;
.button {
height: 80rpx;
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
border-radius: 40rpx;
font-size: 32rpx;
font-weight: 400;
color: #ffffff;
line-height: 80rpx;
}
}
.action-btn {
margin-left: 45rpx;
width: 121rpx;
height: 61rpx;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 30rpx;
background: rgba(255, 255, 255, 0.2);
text-align: center;
font-size: 30rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
line-height: 61rpx;
}
.tag1 {
padding: 5rpx;
background: rgba(0, 179, 139, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.tag3 {
padding: 5rpx;
background: rgba(139, 112, 228, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.tag2 {
padding: 5rpx;
background: rgba(249, 97, 60, 0.5);
border-radius: 6rpx;
font-size: 22rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.ul-item {
padding: 5px 20rpx;
display: flex;
align-items: center;
.item-value {
padding: 20rpx;
position: absolute;
display: flex;
align-items: center;
justify-content: space-around;
.content {
.title {
font-size: 32rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
.tip {
font-size: 24rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
}
}
.icon-tip {
width: 100rpx;
height: 100rpx;
}
.content {
margin-left: 40rpx;
}
}
</style>

+ 1
- 1
manifest.json Просмотреть файл

@@ -52,7 +52,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx008c60533388527a",
"appid" : "wx214b4f8de36a0181",
"setting" : {
"urlCheck" : false,
"checkSiteMap" : false,

+ 3
- 2
pages/index/index.vue Просмотреть файл

@@ -18,7 +18,7 @@

<!-- 按钮导航 -->
<view class="nav">
<view class="item-box" @click="$util.navTo('/pages/recharge/recharge',true)">
<view class="item-box" @click="$util.navTo('/pages/recharge/select-car',true)">
<view class="item item-1">
<image :src="fileURL + 'image/index/item-1.png'" />
</view>
@@ -304,8 +304,9 @@ import { navTo,confirm } from "../../utils/utils";

const goToRecharge = () => {
console.log("执行点击事件");
console.log('321')
uni.navigateTo({
url: "/pages/recharge/recharge",
url: "/pages/recharge/select-car",
});
};


+ 12
- 7
pages/recharge/select-car.vue Просмотреть файл

@@ -1,9 +1,9 @@
<template>
<view class="selectCar-box">
<view class="item" v-for="(item,i) in list" :key="i">
<view class="item" v-for="(item,i) in state.list" :key="i">
<view class="iten-left">
<image :src="`${$imgUrl}che.png`" mode=""></image>
<text>{{item.name}}</text>
<text>{{item.vehiclePlate}}</text>
</view>
<view class="choose-item" @click="choose(i,item)">
<view class="active" v-if="flag==i">
@@ -42,16 +42,21 @@
} from "@/utils/storage";
import {
stringToJson
} from "@/utils/network/encryption";
} from "@/utils/network/encryption";
const state = reactive({
list:[]
});
onLoad(() => {
quanCheckActionTrue().then(item => {
quanCheckActionTrue().then((item :any) => {
state.list = item.data
console.log(item)
})
});
});
const quanCheckActionTrue = () => {
var data = {
opId: '',
opId: getItem(StorageKeys.OpenId),
source: 'WECHAT',
tabIndex: '0',
orderStep: '11',

+ 2
- 2
utils/network/api.js Просмотреть файл

@@ -2,8 +2,8 @@
export const appId = "52030131"; //应用appid 综合业务支撑平台使用
export const loginTime = 86400; //登录有效时间(单位s) 1天
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f6"; //支付配置编号 微信小程序支付
export const wechatAppID = "wx008c60533388527a"; //小程序APPid
export const wechatSecret = "95197718b43b497f02732bd9f8011080"; //小程序AppSecret
export const wechatAppID = "wx214b4f8de36a0181"; //小程序APPid
export const wechatSecret = "125a44b60b00d7e8a3820cc4cbdbdae8"; //小程序AppSecret

/*统一 会员平台*/
export const sendCode = "2"; //统一会员平台发送验证码接口

Загрузка…
Отмена
Сохранить