Browse Source

购物车功能,订单提交功能,文化数据交易协议

master
wanghongjun 2 years ago
parent
commit
f8401274f4
  1. 28
      api/goods.js
  2. 41
      api/user.js
  3. 79
      components/empty-cart/index.vue
  4. 28
      pages.json
  5. 8
      pages/goods/detail.vue
  6. 678
      pages/goods/payment/orderPayment.vue
  7. 263
      pages/goods/payment/verifyPayment.vue
  8. 167
      pages/help/purchase.vue
  9. 4
      pages/login/components/WhPopup.vue
  10. 35
      pages/user/index.vue
  11. 4
      pages/user/mycertinfo/mycertinfo.vue
  12. 2
      pages/user/mycertinfo/orgverify.vue
  13. 543
      pages/user/shopcart/index.vue
  14. BIN
      static/tabbar/cart_empty.jpg

28
api/goods.js

@ -15,6 +15,11 @@ const api = {
paymentListUrl: "Paymentlist/certiaudit/listIndet", paymentListUrl: "Paymentlist/certiaudit/listIndet",
certificationPay: "PayCallBack/order/certificationPay", certificationPay: "PayCallBack/order/certificationPay",
rankingList: "AgencyAddress/ranking/queryList", rankingList: "AgencyAddress/ranking/queryList",
orderPaymentList: "AgencyAddress/order/queryRrder",
userOrderpay: "slb/pay/order/userOrderpay",
marketleader: "AgencyAddress/ranking/insertCount",
addClient: "AgencyAddress/signInfo/insertEntrustingPartyInfo",
addClickmarket: "AgencyAddress/signInfo/insertEntrustingPartyInfo",
} }
// 商品列表 // 商品列表
@ -93,3 +98,26 @@ export const getRankingList = (param) => {
return request.get(api.rankingList + paramStr,{}) return request.get(api.rankingList + paramStr,{})
} }
// 缴费订单列表
export const orderPaymentList = (data) => {
return request.post(api.orderPaymentList,data)
}
// 订单确认支付
export const userOrderpay = (data) => {
return request.post(api.userOrderpay,data)
}
// 排行榜销售量
export const marketleader = (data) => {
return request.post(api.marketleader,data)
}
// 添加委托方统计数据
export const addClient = (data) => {
return request.post(api.addClient,data)
}
// 交易信息数据统计销售量
export const addClickmarket = (data) => {
return request.post(api.addClickmarket,data)
}

41
api/user.js

@ -10,6 +10,14 @@ const api = {
oplogs: "slb/userself/v1/account/operation", oplogs: "slb/userself/v1/account/operation",
//重置密码 //重置密码
resetpwd:'slb/userself/v1/account/reset-pwd', resetpwd:'slb/userself/v1/account/reset-pwd',
// 购物车
shop_cart: "tes/api/goods/getShoppingCar",
// 购物车
del_shop_cart: "AgencyAddress/order/delShoppingCa",
// 去结算
create_order: "AgencyAddress/order/createOrder",
// 发票管理
bill_manage: "AgencyAddress/order/getTicket",
} }
// 当前登录的用户信息 // 当前登录的用户信息
@ -45,4 +53,37 @@ export const oplogs = (param, option) => {
// 重置用户密码 // 重置用户密码
export const resetpass = (data,option) =>{ export const resetpass = (data,option) =>{
return request.post(api.resetpwd,data,option) return request.post(api.resetpwd,data,option)
}
// 获取购物车列表
export function getShopCart(data){
return request.post(api.shop_cart,data)
}
// 删除购物车
export function delShopCart(param){
let paramArr = [];
for (let key in param) {
paramArr.push(key + '=' + param[key])
}
let paramStr = '?' + paramArr.join('&')
return request.post(api.del_shop_cart + paramStr)
}
// 删除购物车
export function createOrder(param){
let paramArr = [];
for (let key in param) {
paramArr.push(key + '=' + param[key])
}
let paramStr = '?' + paramArr.join('&')
return request.post(api.create_order + paramStr)
}
// 发票管理
export function getBillManage(data){
let option={header:{
"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"
}}
return request.post(api.bill_manage,data,option)
} }

79
components/empty-cart/index.vue

@ -0,0 +1,79 @@
<template>
<view v-if="!isLoading" class="empty-content" :style="customStyle">
<view class="empty-icon">
<image class="image" src="/static/tabbar/cart_empty.jpg" mode="widthFix"></image>
</view>
<view class="tips">{{ tips }}</view>
<slot name="slot"></slot>
</view>
</template>
<script>
export default {
/**
* 组件的属性列表
* 用于组件自定义设置
*/
props: {
//
isLoading: {
type: Boolean,
default: true
},
//
customStyle: {
type: Object,
default () {
return {}
}
},
//
tips: {
type: String,
default: '亲,暂无相关数据'
}
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.empty-content {
box-sizing: border-box;
width: 100%;
padding: 140rpx 50rpx;
text-align: center;
margin-top: calc(50% - 200rpx);
.tips {
font-size: 28rpx;
color: gray;
margin: 50rpx 0;
}
.empty-icon {
padding: 0rpx;
width: 350rpx;
height: 350rpx;
border: #cfcfcf 1rpx solid;
border-radius: 50%;
margin-left: calc(50% - 175rpx);
z-index: 2;
background-color: #ffffff;
}
.image {
z-index: 1;
width: 245rpx;
margin-top: 50rpx;
}
}
</style>

28
pages.json

@ -55,12 +55,6 @@
"enablePullDownRefresh" : false "enablePullDownRefresh" : false
} }
}, },
{
"path": "pages/cart/index",
"style": {
"navigationBarTitleText": "购物车"
}
},
{ {
"path": "pages/user/index", "path": "pages/user/index",
"style": { "style": {
@ -350,7 +344,7 @@
"navigationBarTitleText" : "公共数据专区", "navigationBarTitleText" : "公共数据专区",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1c223b", "navigationBarBackgroundColor": "#1c223b",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true
} }
}, },
{ {
@ -360,7 +354,7 @@
"navigationBarTitleText" : "数据超市", "navigationBarTitleText" : "数据超市",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1c223b", "navigationBarBackgroundColor": "#1c223b",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true
} }
}, },
{ {
@ -370,7 +364,7 @@
"navigationBarTitleText" : "文化资源数据", "navigationBarTitleText" : "文化资源数据",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1c223b", "navigationBarBackgroundColor": "#1c223b",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true
} }
}, },
{ {
@ -380,7 +374,7 @@
"navigationBarTitleText" : "文化数字内容", "navigationBarTitleText" : "文化数字内容",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1c223b", "navigationBarBackgroundColor": "#1c223b",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true
} }
}, },
{ {
@ -388,7 +382,17 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "购物车", "navigationBarTitleText" : "购物车",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true,
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#1c223b"
}
},
{
"path" : "pages/goods/payment/verifyPayment",
"style" :
{
"navigationBarTitleText" : "认证订单结算",
"enablePullDownRefresh" : true
} }
}, },
{ {
@ -396,7 +400,7 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "订单结算", "navigationBarTitleText" : "订单结算",
"enablePullDownRefresh" : false "enablePullDownRefresh" : true
} }
}, },
{ {

8
pages/goods/detail.vue

@ -250,7 +250,6 @@
shopyear_show: false, // shopyear_show: false, //
talprice_show: false, // talprice_show: false, //
purchase_show: false, // purchase_show: false, //
shopyear_num: '', //
shopcart_str: '加入购物车', shopcart_str: '加入购物车',
new_total: 0, // new_total: 0, //
addprice: 0, // addprice: 0, //
@ -378,7 +377,7 @@
} else { } else {
if (app.ears_of === 2) { if (app.ears_of === 2) {
let shopyear_num = app.shopyear_num let shopyear_num = app.use_years
if (shopyear_num === 0 || shopyear_num === '') { if (shopyear_num === 0 || shopyear_num === '') {
app.$error('购买年限只能输入整数') app.$error('购买年限只能输入整数')
} else { } else {
@ -409,7 +408,7 @@
let param = { let param = {
goods_isli : app.goods.goods_islicode, goods_isli : app.goods.goods_islicode,
user_isli : uni.getStorageSync("isliCode"), user_isli : uni.getStorageSync("isliCode"),
use_years : 0, use_years : app.use_years,
} }
if (app.ears_of === 3) { if (app.ears_of === 3) {
param.use_years = 1 param.use_years = 1
@ -482,8 +481,7 @@
if (res.resultCode === "00000000") { if (res.resultCode === "00000000") {
// //
this.$navTo('pages/goods/payment/orderPayment', { batchcode:res.data.batchcode, img: app.goods.img, time: new Date().getTime() })
this.$navTo('pages/goods/payment', { batchcode:res.data.batchcode, img: app.goods.img, time: new Date().getTime() })
} else { } else {
app.$error(res.errMsg); app.$error(res.errMsg);
} }

678
pages/goods/payment/orderPayment.vue

@ -8,256 +8,582 @@
<view class="item-pay-con"> <view class="item-pay-con">
<view class="item-pay-con-ti"> <view class="item-pay-con-ti">
认证缴费订 标的清
</view> </view>
<view class="item-pay-con-tab"> <view class="item-pay-con-tab">
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据"> <uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
<uni-tr> <uni-tr>
<uni-th width="140" align="center">订单号</uni-th> <uni-th width="140" align="center">缩略图</uni-th>
<uni-th width="120" align="center">姓名</uni-th> <uni-th align="center">标的名称</uni-th>
<uni-th align="center">订单金额</uni-th> <uni-th align="center">委托关联编码</uni-th>
<uni-th align="center">付费类型</uni-th>
<uni-th align="center">交易方式</uni-th>
<uni-th align="center">委托方</uni-th>
<uni-th align="center">单价</uni-th>
<uni-th align="center">购买年限</uni-th>
<uni-th align="center">小计</uni-th>
<uni-th align="center">交易佣金</uni-th>
<uni-th align="center">合计</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(item, index) in tableList" :key="index"> <uni-tr v-for="(item, index) in tableList" :key="index">
<uni-td>{{ item.pay_no }}</uni-td> <uni-td align="center">
<uni-td> <image class="td-image" :src="item.order_detail[0].goods_image"></image>
<view class="name">认证缴费订单</view>
</uni-td> </uni-td>
<uni-td align="center">{{ item.address }}</uni-td> <uni-td align="center">{{ item.buy_username }}</uni-td>
<uni-td align="center">{{ item.buy_islicode }}</uni-td>
<uni-td align="center">{{ item.price_type}}</uni-td>
<uni-td align="center">{{ item.goods_entrust }}</uni-td>
<uni-td align="center">{{ item.order_detail[0].entrust_name }}</uni-td>
<uni-td align="center">{{ item.price }}</uni-td>
<uni-td align="center">{{ item.transaction_count }}</uni-td>
<uni-td align="center">{{ item.small_count }}</uni-td>
<uni-td align="center">{{ item.order_detail[0].service_charge }}</uni-td>
<uni-td align="center">{{ item.money }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view> <view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
</view> </view>
</view> </view>
<view class="privacy">
<checkbox :checked="isTick" color="#4399ff" class="ckbox" @click="readpri"></checkbox>
<view class="privacy_view">
我已阅读并同意 <text class="atxt" @click="gotopage('purchase')">文化数据交易协议</text>
</view>
</view>
</view> </view>
<!-- 协议弹框 -->
<whpop v-model="showPopup" :maskCloseAble="true" :mkey="murl"></whpop>
<view class="item-pay"> <view class="item-pay">
<image class="item-pay-img" v-if="is_show_img" :src="pay_image"></image> <image class="item-pay-img" v-if="is_show_img" :src="pay_image"></image>
<text class="item-pay-prompt" v-if="is_show_img">请扫码支付</text> <text class="item-pay-prompt" v-if="is_show_img">
<button class="item-pay-sub" :disabled="isDisabled" @click="handlerPay">确认支付</button> 温馨提示 请使用 网银支付宝 App扫码支付
</text>
<text class="item-pay-res res-success" v-if="payResult == 1">支付成功</text>
<text class="item-pay-res res-error" v-if="payResult == 2">支付失败</text>
<button class="item-pay-go" v-if="goBuyOrder" @click="goToBuyOrder">进入买入订单</button>
<button :class="isDisabled ? 'item-pay-sub2' : 'item-pay-sub'" :disabled="isDisabled" @click="handlerPay">确认支付</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import * as GoodsApi from '@/api/goods' import * as GoodsApi from '@/api/goods'
import uniTable from "@/uni_modules/uni-table/components/uni-table/uni-table" import * as VerifyApi from '@/api/verify'
import uniTr from "@/uni_modules/uni-table/components/uni-tr/uni-tr" import uniTable from "@/uni_modules/uni-table/components/uni-table/uni-table"
import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th" import uniTr from "@/uni_modules/uni-table/components/uni-tr/uni-tr"
import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td" import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th"
import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination" import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td"
import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination"
export default { import whpop from '../../login/components/WhPopup'
name: "payment",
components: { export default {
'uni-table': uniTable, name: "payment",
'uni-tr': uniTr, components: {
'uni-th': uniTh, 'uni-table': uniTable,
'uni-td': uniTd, 'uni-tr': uniTr,
'uni-pagination': uniPagination, 'uni-th': uniTh,
'uni-td': uniTd,
'uni-pagination': uniPagination,
'whpop': whpop,
},
data () {
return {
tableList: [],
payTypeArr: [
{
title: '网银支付',
value: 15
},{
title: '支付宝',
value: 12
},
],
payType: 15,
loading: false,
selectedIndexs: [],
pageSize: 10, //
pageCurrent: 1, //
total: 0, //
good_money: 0, //
isDisabled: false, //
is_show_img: false, //
pay_image: '', //
batchcode: '', //
isTick: false, //
showPopup: false, //
murl: '', //
dateS: 180, // 3
quantitySaleDate: [],//
Client_date: {
entrustingPartyName: [],//
identityCode: [],//
entrustSignNumber: 0,//
orderNumber: 1//
},
marketislicode: '',
payResult: 0, //
goBuyOrder: false, //
}
},
watch: {
dateS: function (newValue, oldValue) {
if (newValue === 0) {
this.$error('由于长时间未支付,即将进入买入订单!')
setTimeout(function () {
uni.navigateTo({
url:'/pages/user/order/buyOrder'
})
},3000)
}
}
},
onLoad(options) {
this.selectedIndexs = []
this.batchcode = options.batchcode
this.getTableList()
},
methods: {
//
changePayType(val) {
this.payType = val
},
//
change(e) {
this.$refs.table.clearSelection()
this.selectedIndexs.length = 0
this.getData(e.current)
},
//
readpri() {
this.isTick = true;
},
//
gotopage(str){
this.murl = str
this.showPopup = ! this.showPopup
}, },
data () { //
return { getTableList(pageNo = 1) {
tableList: [], const app = this
payTypeArr: [ let param = {
{ user_isli : uni.getStorageSync("accountId"),
title: '网银支付', user_role : 1,
value: 15 batchcode : app.batchcode
},{
title: '支付宝',
value: 12
},
],
payType: 15,
loading: false,
selectedIndexs: [],
pageSize: 10, //
pageCurrent: 1, //
total: 0, //
good_money: 0, //
isDisabled: false, //
is_show_img: false, //
pay_image: '', //
} }
return new Promise((resolve, reject) => {
GoodsApi.orderPaymentList(param).then(res => {
if (res.resultCode === "00000000" && res.data.length > 0) {
app.loading = false
app.tableList = res.data
app.handlerTableList()
app.quantitySale(app.tableList[0].order_detail)
} else {
app.$error(res.errMsg);
}
resolve()
}).catch(reject)
})
}, },
onLoad() { // table
this.selectedIndexs = [] handlerTableList() {
this.getTableList() const app = this
this.tableList.map(item => {
let order_detail = item.order_detail[0]
item.price_type = order_detail.price > 0 ? '付费' : '免费'
if (order_detail.goods_entrust == 1) {
item.goods_entrust = "转让"
} else if (order_detail.goods_entrust == 2) {
item.goods_entrust = "授权"
}
item.price = app.handlerPrice(order_detail.price)
if (order_detail.transaction_count == "-" && order_detail.goods_entrust == "1") {
item.transaction_count = "永久"
} else if (order_detail.price == 0) {
item.transaction_count = "永久"
} else {
item.transaction_count = order_detail.transaction_count + '年'
}
item.small_count = ''
if (order_detail.goods_entrust == "2" && Number(order_detail.price) > 0) {
let total = Math.floor(parseFloat(order_detail.price * 100 * order_detail.transaction_count)) / 100;
item.small_count = app.handlerPrice(total)
} else {
item.small_count = app.handlerPrice(order_detail.price)
}
item.money = app.handlerPrice(order_detail.money)
//
app.good_money += item.total_money
})
if (this.good_money > 20000) {
//
app.isDisabled = true
}
}, },
methods: { //
// quantitySale(orderDate) {
changePayType(val) { const app = this
this.payType = val orderDate.forEach(function (item) {
}, if (Number(item.price) > 0) {
// if (item.goods_entrust == 2) {
change(e) { app.quantitySaleDate.push({
this.$refs.table.clearSelection() chargesType: 2,//1- 2-
this.selectedIndexs.length = 0 clickCount: 0,//
this.getData(e.current) contractualPeriod: item.contractual_period,//1- 3- 2-
}, countType: 2,// 1- 2-
// goodsEntrust: item.goods_entrust,//1-2-
getTableList(pageNo = 1) { goodsIsliCode: item.goods_islicode,//isli
const app = this goodsName: item.goods_name,//
let param = { goodsOwnershipStr: item.goods_ownership_str,//
userid : uni.getStorageSync("accountId"), goodsType: item.goods_type,//1- 2-
isok : 2, salesVolume: 1 //
});
}
} }
return new Promise((resolve, reject) => { });
GoodsApi.paymentList(param).then(res => { },
if (res.resultCode === "00000000") { //
app.tableList = res.data handlerPrice(price) {
//app.good_money = res.data[0].paysum let f = parseFloat(price);
} else { if (!isNaN(f)) {
app.$error(res.errMsg); f = Math.round(price * 100) / 100;
} let s = f.toString();
resolve() let rs = s.indexOf('.');
}).catch(reject) if (rs < 0) {
}) rs = s.length;
}, s += '.';
// }
handlerPay () { while (s.length <= rs + 2) {
const app = this s += '0';
let shopnameArr = [] }
let shop_price_arr = [] return '¥' + s;
app.tableList.forEach((item) => { }
shopnameArr.push = item.pay_no return '¥' + price
shop_price_arr.push = item.paysum },
}) //
let shopname = shopnameArr.join(',') handlerPay () {
let shop_price = shop_price_arr.join(',') const app = this
let new_shop_Name = '' if (app.isTick) {
let Merchant_id = uni.getStorageSync("Merchant_id") // id
let accountId = uni.getStorageSync("accountId") // isli let Merchant_id = uni.getStorageSync("Merchant_id")
let user_isli = uni.getStorageSync("isliCode")//isli
let agreement = {
agreementIds: "7",
userId: uni.getStorageSync("cuser").cellPhone
}
//
VerifyApi.preservation(agreement);
let paramArr = {
marketislicode: [],
manyName: [],
shopname: [],
shop_price: [],
new_shop_Name: [],
}
//
let new_user_year = [];
//
let user_year = null;
for (let i = 0; i < app.tableList.length; i++) {
let All_data = app.tableList[i]
if (app.batchcode != All_data.batchcode) {
continue
}
let item = All_data.order_detail[0]
//
paramArr.marketislicode.push(item.goods_islicode)
//
app.Client_date.entrustingPartyName.push(item.entrust_name)
//
app.Client_date.identityCode.push(item.entrust_islicode)
paramArr.manyName.push(item.goods_name)
paramArr.shopname.push(item.entrust_islicode)
paramArr.shop_price.push(item.price)
if (item.transaction_count == "-") {
item.transaction_count = 99;
new_user_year.push(item.transaction_count);
} else {
new_user_year.push(item.transaction_count);
}
//
if (item.goods_status != "1" && item.goods_status != "5") {
paramArr.new_shop_Name.push(item.goods_name)
}
}
app.Client_date.entrustingPartyName = app.Client_date.entrustingPartyName.join(',')
app.Client_date.identityCode = app.Client_date.identityCode.join(',')
app.marketislicode = paramArr.marketislicode.join(',');
let manyName = paramArr.manyName.join(',');
let shopname = paramArr.shopname.join(',');
let shop_price = paramArr.shop_price.join(',');
let new_shop_Name = paramArr.new_shop_Name.join(',');
new_user_year.forEach(function (item) {
user_year += Number(item);
});
// //
let manyMony = 0; let manyMony = 0;
manyMony = (Number(app.good_money * 100)).toFixed(0); manyMony = (Number(app.good_money * 100)).toFixed(0);
let newmanyName = manyName; //
if (manyName.length > 100) {
manyName = manyName.split(",")[0];
}
let payment = { let payment = {
amount: manyMony, // amount: manyMony, //
app_id: Merchant_id, //id app_id: Merchant_id, //id
body: "认证缴费订单", // body: manyName, //
businesstype: 1001, //1001-2001- businesstype: 1001, //1001-2001-
ordernumber: shopname, // ordernumber: app.batchcode, //
paymenttypeid: app.payType, //1213 15 paymenttypeid: app.payType, //1213 15
subpaymenttypeid: app.payType, //1213 15 subpaymenttypeid: app.payType, //1213 15
businesstime: app.getDayTimer(new Date()), businesstime: app.getDayTimer(new Date()),
buyer: accountId, //() isli buyer: user_isli, //() isli
chargeuptype: 2, //1-2-, chargeuptype: 2, //1-2-,
goodsname: "认证缴费订单", // goodsname: newmanyName, //
orderamount: manyMony, //() orderamount: manyMony, //()
payorderid: shopname, // payorderid: app.batchcode, //
price: shop_price, //() price: shop_price, //()
seller: accountId, //() seller: shopname, //()
settlementamount: manyMony, //() settlementamount: manyMony, //()
settlementtype: 2, //:1-;2- settlementtype: 2, //:1-;2-
totalqty: 1 // totalqty: user_year, //
} }
if (new_shop_Name == "") { if (new_shop_Name == "") {
//
app.isDisabled = true app.isDisabled = true
payment.body = encodeURIComponent(payment.body, "ut-8")
payment.goodsname = encodeURIComponent(payment.goodsname, "ut-8") GoodsApi.userOrderpay(payment).then(res => {
// if (res.resultCode === "00000000") {
let paramArr = '';
for (let key in payment) { if (app.payType != "15" && app.payType != "15") {
paramArr.push(key + '=' + payment[key])
}
let paramStr = '?' + paramArr.join('&')
GoodsApi.certificationPay(paramStr).then(res => {
if (res.resultCode == '00000000') {
if (app.payType != 15) {
app.is_show_img = true app.is_show_img = true
app.pay_image = res.data.qrcodeurl app.pay_image = res.data.qrcodeurl
setInterval(app.handelRote,5000)
app.countDown()
app.isDisabled = false
} else { } else {
app.$success('支付成功')
this.getTableList() app.isDisabled = false
setInterval(app.handelRote,5000)
} }
} else {
app.$error(res.resultMsg);
} }
}) })
} else { } else {
app.$error(new_shop_Name + "无法购买") app.$error(new_shop_Name + "无法购买")
} }
},
//
getDayTimer (data) {
let date = new Date(data)
let y = date.getFullYear()
let m = date.getMonth() + 1
m = m < 10 ? ('0' + m) : m
let d = date.getDate()
d = d < 10 ? ('0' + d) : d
let currentdate = y + '-' + m + '-' + d;
let hh = date.getHours()
hh = hh < 10 ? ('0' + hh) : hh
let mm = date.getMinutes()
mm = mm < 10 ? ('0' + mm) : mm
let ss = date.getSeconds()
ss = ss < 10 ? ('0' + ss) : ss
let time = hh + ':' + mm + ':' + ss;
return currentdate + " " + time
},
} } else {
app.$error('请勾选《文化数据交易协议》')
}
},
//
handelRote() {
const app = this
let param = {
user_isli : uni.getStorageSync("accountId"),
user_role : 1,
batchcode : app.batchcode
}
GoodsApi.orderPaymentList(param).then(res => {
if (res.resultCode === "00000000" && res.data.length > 0) {
app.loading = false
app.tableList = res.data
this.tableList.map(item => {
let order_detail = item.order_detail[0]
let status = order_detail.pay_status;
if (status == 2) {
GoodsApi.marketleader(app.quantitySaleDate);//
GoodsApi.addClient(app.Client_date);//
GoodsApi.addClickmarket(app.marketislicode);
app.payResult = 1
app.goBuyOrder = true
} else if (status == 3) {
app.payResult = 2
app.goBuyOrder = true
}
})
} else {
app.$error(res.resultMsg);
}
})
},
goToBuyOrder () {
uni.navigateTo({
url:'/pages/user/order/buyOrder'
})
},
//
countDown(){
let app = this
// console.log(qq)
setTimeout(function(){
if(app.dateS>1){
app.dateS--
app.countDown(app.dateS)
}else{
app.dateS=0
}
},1000)
},
//
getDayTimer (data) {
let date = new Date(data)
let y = date.getFullYear()
let m = date.getMonth() + 1
m = m < 10 ? ('0' + m) : m
let d = date.getDate()
d = d < 10 ? ('0' + d) : d
let currentdate = y + '-' + m + '-' + d;
let hh = date.getHours()
hh = hh < 10 ? ('0' + hh) : hh
let mm = date.getMinutes()
mm = mm < 10 ? ('0' + mm) : mm
let ss = date.getSeconds()
ss = ss < 10 ? ('0' + ss) : ss
let time = hh + ':' + mm + ':' + ss;
return currentdate + " " + time
},
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
width: 100%; width: 100%;
.item-pay { .item-pay {
.item-pay-con { .item-pay-con {
margin-top: 30rpx;
padding-top: 30rpx;
.item-pay-con-ti {
height: 50rpx;
margin-left: 20rpx;
padding-left: 10px;
border-left: #407ac4 10rpx solid;
display: flex;
align-items: center;
text-align: center;
}
.item-pay-con-bu {
width: 200rpx;
margin-top: 30rpx; margin-top: 30rpx;
padding-top: 30rpx; margin-left: 50rpx;
border-radius: 15rpx;
.item-pay-con-ti { display: inline-block;
height: 50rpx; border: #e5e5e5 1rpx solid;
margin-left: 20rpx; background-color: #e5e5e5;
padding-left: 10px; }
border-left: #407ac4 10rpx solid; .item-pay-con-bu-show {
display: flex; background-color: #defedc;
align-items: center; }
text-align: center;
}
.item-pay-con-bu { .item-pay-con-tab {
margin-top: 20rpx;
.td-image {
width: 200rpx; width: 200rpx;
margin-top: 30rpx; height: 200rpx;
margin-left: 50rpx;
border-radius: 15rpx;
display: inline-block;
border: #e5e5e5 1rpx solid;
background-color: #e5e5e5;
}
.item-pay-con-bu-show {
background-color: #defedc;
} }
} }
}
.item-pay-sub { .item-pay-res {
color: #ffffff; margin-left: calc(50% - 80rpx);
margin-top: 200rpx; font-size: 38rpx;
background-color: #407ac4; }
}
.item-pay-img { .res-success {
width: 200px; color: green;
height: 200px; }
margin-top: 15%;
margin-left: 25%;
background-color: #eeeeee;
}
.item-pay-prompt { .res-error {
display: block; color: red;
text-align: center;
color: red;
}
} }
.item-pay-sub {
color: #ffffff;
margin-top: 200rpx;
background-color: #407ac4;
}
.item-pay-sub2 {
color: #ffffff;
margin-top: 200rpx;
background-color: #9F9F9F;
}
.item-pay-go {
color: #ffffff;
background-color: orange;
}
.item-pay-img {
width: 200px;
height: 200px;
margin-top: 15%;
margin-left: 25%;
background-color: #eeeeee;
}
.item-pay-prompt {
display: block;
text-align: center;
color: red;
}
}
//
.privacy{
display: flex;
margin-top: 50rpx;
margin-bottom: 50rpx;
margin-left: 15rpx;
.ckbox{
border-radius: 50%;
}
.privacy_view {
margin-left: 20rpx;
}
.atxt{
color: #4399ff;
}
} }
}
</style> </style>

263
pages/goods/payment/verifyPayment.vue

@ -0,0 +1,263 @@
<template>
<view class="container">
<view class="item-pay">
<view class="item-pay-con">
<view class="item-pay-con-ti">选择支付方式</view>
<button class="item-pay-con-bu" :class="{'item-pay-con-bu-show': payType === items.value}" v-for="items in payTypeArr" @click="changePayType(items.value)">{{items.title}}</button>
</view>
<view class="item-pay-con">
<view class="item-pay-con-ti">
认证缴费订单
</view>
<view class="item-pay-con-tab">
<uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th width="140" align="center">订单号</uni-th>
<uni-th width="120" align="center">姓名</uni-th>
<uni-th align="center">订单金额</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableList" :key="index">
<uni-td>{{ item.pay_no }}</uni-td>
<uni-td>
<view class="name">认证缴费订单</view>
</uni-td>
<uni-td align="center">{{ item.address }}</uni-td>
</uni-tr>
</uni-table>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
</view>
</view>
</view>
<view class="item-pay">
<image class="item-pay-img" v-if="is_show_img" :src="pay_image"></image>
<text class="item-pay-prompt" v-if="is_show_img">请扫码支付</text>
<button class="item-pay-sub" :disabled="isDisabled" @click="handlerPay">确认支付</button>
</view>
</view>
</template>
<script>
import * as GoodsApi from '@/api/goods'
import uniTable from "@/uni_modules/uni-table/components/uni-table/uni-table"
import uniTr from "@/uni_modules/uni-table/components/uni-tr/uni-tr"
import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th"
import uniTd from "@/uni_modules/uni-table/components/uni-td/uni-td"
import uniPagination from "@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination"
export default {
name: "payment",
components: {
'uni-table': uniTable,
'uni-tr': uniTr,
'uni-th': uniTh,
'uni-td': uniTd,
'uni-pagination': uniPagination,
},
data () {
return {
tableList: [],
payTypeArr: [
{
title: '网银支付',
value: 15
},{
title: '支付宝',
value: 12
},
],
payType: 15,
loading: false,
selectedIndexs: [],
pageSize: 10, //
pageCurrent: 1, //
total: 0, //
good_money: 0, //
isDisabled: false, //
is_show_img: false, //
pay_image: '', //
}
},
onLoad() {
this.selectedIndexs = []
this.getTableList()
},
methods: {
//
changePayType(val) {
this.payType = val
},
//
change(e) {
this.$refs.table.clearSelection()
this.selectedIndexs.length = 0
this.getData(e.current)
},
//
getTableList(pageNo = 1) {
const app = this
let param = {
userid : uni.getStorageSync("accountId"),
isok : 2,
}
return new Promise((resolve, reject) => {
GoodsApi.paymentList(param).then(res => {
if (res.resultCode === "00000000") {
app.tableList = res.data
//app.good_money = res.data[0].paysum
} else {
app.$error(res.errMsg);
}
resolve()
}).catch(reject)
})
},
//
handlerPay () {
const app = this
let shopnameArr = []
let shop_price_arr = []
app.tableList.forEach((item) => {
shopnameArr.push = item.pay_no
shop_price_arr.push = item.paysum
})
let shopname = shopnameArr.join(',')
let shop_price = shop_price_arr.join(',')
let new_shop_Name = ''
let Merchant_id = uni.getStorageSync("Merchant_id") // id
let accountId = uni.getStorageSync("accountId") // isli
//
let manyMony = 0;
manyMony = (Number(app.good_money * 100)).toFixed(0);
let payment = {
amount: manyMony, //
app_id: Merchant_id, //id
body: "认证缴费订单", //
businesstype: 1001, //1001-2001-
ordernumber: shopname, //
paymenttypeid: app.payType, //1213 15
subpaymenttypeid: app.payType, //1213 15
businesstime: app.getDayTimer(new Date()),
buyer: accountId, //() isli
chargeuptype: 2, //1-2-,
goodsname: "认证缴费订单", //
orderamount: manyMony, //()
payorderid: shopname, //
price: shop_price, //()
seller: accountId, //()
settlementamount: manyMony, //()
settlementtype: 2, //:1-;2-
totalqty: 1 //
}
if (new_shop_Name == "") {
app.isDisabled = true
payment.body = encodeURIComponent(payment.body, "ut-8")
payment.goodsname = encodeURIComponent(payment.goodsname, "ut-8")
//
let paramArr = '';
for (let key in payment) {
paramArr.push(key + '=' + payment[key])
}
let paramStr = '?' + paramArr.join('&')
GoodsApi.certificationPay(paramStr).then(res => {
if (res.resultCode == '00000000') {
if (app.payType != 15) {
app.is_show_img = true
app.pay_image = res.data.qrcodeurl
} else {
app.$success('支付成功')
this.getTableList()
}
}
})
} else {
app.$error(new_shop_Name + "无法购买")
}
},
//
getDayTimer (data) {
let date = new Date(data)
let y = date.getFullYear()
let m = date.getMonth() + 1
m = m < 10 ? ('0' + m) : m
let d = date.getDate()
d = d < 10 ? ('0' + d) : d
let currentdate = y + '-' + m + '-' + d;
let hh = date.getHours()
hh = hh < 10 ? ('0' + hh) : hh
let mm = date.getMinutes()
mm = mm < 10 ? ('0' + mm) : mm
let ss = date.getSeconds()
ss = ss < 10 ? ('0' + ss) : ss
let time = hh + ':' + mm + ':' + ss;
return currentdate + " " + time
},
}
}
</script>
<style lang="scss" scoped>
.container {
width: 100%;
.item-pay {
.item-pay-con {
margin-top: 30rpx;
padding-top: 30rpx;
.item-pay-con-ti {
height: 50rpx;
margin-left: 20rpx;
padding-left: 10px;
border-left: #407ac4 10rpx solid;
display: flex;
align-items: center;
text-align: center;
}
.item-pay-con-bu {
width: 200rpx;
margin-top: 30rpx;
margin-left: 50rpx;
border-radius: 15rpx;
display: inline-block;
border: #e5e5e5 1rpx solid;
background-color: #e5e5e5;
}
.item-pay-con-bu-show {
background-color: #defedc;
}
}
.item-pay-sub {
color: #ffffff;
margin-top: 200rpx;
background-color: #407ac4;
}
.item-pay-img {
width: 200px;
height: 200px;
margin-top: 15%;
margin-left: 25%;
background-color: #eeeeee;
}
.item-pay-prompt {
display: block;
text-align: center;
color: red;
}
}
}
</style>

167
pages/help/purchase.vue

@ -0,0 +1,167 @@
<template>
<view class="privacy">
<view class="prizone">
<view class="pri_h">文化数据交易协议</view>
<text class="trade_p">
本协议是被授权方/买方签订的交易转让/授权协议对被授权方/买方购买/被授权授权方/卖方交易标的的行为作出规定如果被授权方/买方通过全国文化大数据交易中心以下简称平台购买/被授权交易标的的视为接受本协议的条款依据中华人民共和国著作权法中华人民共和国民法典等有关法律法规和国家文化大数据交易规则试行及其他相关配套规定现就文化大数据交易相关事宜达成如下协议以咨共同遵守
</text>
<text class="trade_p">
本协议中的部分条款仅针对特定的交易类别和交易方式即转让或授权适用详见本协议具体条款标注说明未作特定标注说明的适用于所有情形
</text>
<text class="trade_bold">转让/授权范围</text>
<text class="trade_p">1.1 转让情形适用</text>
<text class="trade_p">
1转让范围包括但不限于复制权发行权出租权展览权表演权放映权广播权信息网络传播权摄制权改编权翻译权汇编权应当由著作权人享有的使用作品的其他权利的单个组合或全部权利转让
</text>
<text class="trade_p">
2转让分单一转让和批量转让授权方/卖方采用哪种转让方式以平台最终展示的标的详情信息为准
</text>
<text class="trade_p">1.2授权情形适用</text>
<text class="trade_p">
1授权方授权的一定时间和区域内包括但不限于复制权发行权出租权展览权表演权放映权广播权信息网络传播权摄制权改编权翻译权汇编权应当由著作权人享有的使用作品的其他权利及其他的单个组合或全部权利授权
</text>
<text class="trade_p">2授权方式包括</text>
<text class="trade_p">授权数量划分授权分单一授权和批量授权</text>
<text class="trade_p">按授权权益类型划分授权分交易标的财产权的单一权益组合权益与全部权益的授权</text>
<text class="trade_p">按授权时限划分阶段性授权永久性授权</text>
<text class="trade_p">按授权性质划分普通授权排他授权独占授权</text>
<text class="trade_p">
3您可以选择使用上述授权方式进行交易也可以同时使用上述几种组合授权方式具体授权方式以平台最终展示的标的详情信息为准当以单个或组合权利授权时被授权方不得使用未获得授权的其他权利未经授权方书面同意被授权方无权将授权权利转授权第三方
</text>
<text class="trade_bold">交易方式及交易标的</text>
<text class="trade_p">
2.1以授权方/卖方自主报价被授权方/买方点选成交为主同时当交易主体有指定匹配需求时交易机构提供服务商评估价和撮合成交为辅的交易方式
</text>
<text class="trade_p">
2.2<span class="trade_bold decora_line">
被授权方/买方通过平台点选交易标的并支付成功的视为被授权方/买方已经对交易标的及其价格进行了尽调且予以认可是被授权方/买方意愿的真实表示被授权方/买方应承担操作及购买/被授权交易标的所带来的一切权利义务及风险平台不对被授权方/买方的操作行为做任何承诺以及承担任何责任
</span>
</text>
<text class="trade_bold">标的价款与费用</text>
<text class="trade_p">
3.1 转让/授权标的价款以点击支付为准您同意并认可交易价款先行支付至平台结算账户使用平台系统统一结算
</text>
<text class="trade_p">
3.2 交易标的转让/授权中涉及的交易佣金服务佣金按照国家文化大数据交易规则试行及相关配套规定相关收费标准及平台发布的管理规定等要求执行
</text>
<text class="trade_p">
3.3 交易标的转让/授权中涉及的有关税费按照国家有关法律规定缴纳
</text>
<text class="trade_bold">标的交割</text>
<text class="trade_p">
被授权方/买方付款完成后可下载相关数据<span class="trade_bold decora_line">7个自然日内</span>未下载完毕则系统默认交易成功并进行结算
</text>
<text class="trade_bold">承诺与保证</text>
<text class="trade_p">
5.1 授权方/卖方承诺并保证您系文化数据中作品的权利人享有该作品著作权权利或者您已获得处分文化数据所需的授权有权处分或行使作品的相关权利而无需其他作品权利人同意您承诺作品不存在抄袭剽窃他人作品或侵犯任何其他第三人知识产权智力成果及合法权益的情形您所授权/转让的作品不存在可能被第三人主张权利的瑕疵
</text>
<text class="trade_p">
5.2 被授权方/买方承诺并保证您的资金为合法安全的自有资金不存在不诚实经营诈骗客户资金等违法经营行为所得或盗窃受贿侵占挪用公司财产毒品犯罪黑社会性质的组织犯罪恐怖活动犯罪走私犯罪贪污贿赂犯罪破坏金融管理秩序犯罪金融诈骗犯罪等行为所得资金不存在洗钱行为来掩饰其资金非法来源获取不法收益的行为不涉及与洗钱相关的大额现金交易可疑交易恐怖融资交易
</text>
<text class="trade_p">
5.3 您承诺并保证有签订和履行本协议全部义务所必需的所有合法权利以及所有内部和外部的批准授权和许可具备签订和履行本协议的能力与资质包括但不限于法律及公司章程规定的股东会董事会批准您提交的文件资料等均是真实全面和有效的
</text>
<text class="trade_p">
5.4 您确认并承诺对交易各项内容均予以充分知晓和理解本次交易属于交易双方真实意思表示并经双方审慎决策完成本次交易
</text>
<text class="trade_p trade_bold">
5.5您承诺并保证所有合作机构及其下属公司关联公司的法定代表人实际控制人及高管人员不得为平台约定不得从事的业务进行站台背书或进行业务关联
</text>
<text class="trade_p">
5.6被授权方/买方承诺并保证不得以淫秽诋毁性或其他非法形式或违反任何适用法规或行业规范的形式使用交易标的的内容
</text>
<text class="trade_bold">保密条款</text>
<text class="trade_p">
6.1各方应当在对讨论签订履行本协议过程中所获悉的属于对方的无法从公开渠道获取的文件及资料包括但不限于商业秘密公司计划运营活动财务信息技术信息经营信息数据信息交易标的信息以及其他商业秘密等予以保密未经对方同意另一方不得超出本协议约定的目的和范围使用上述信息不得向任何第三方泄漏上述信息
</text>
<text class="trade_p">
6.2 除本协议规定之工作所需外未经对方事先书面同意任何一方不得擅自使用复制对方的商标标志商业信息技术及其他资料
</text>
<text class="trade_p">
6.3 本保密条款不因双方协议的终止而无效在协议终止后本保密条款对各方仍具有约束力
</text>
<text class="trade_bold">违约责任</text>
<text class="trade_p">
7.1 因授权方/卖方作品权利存在瑕疵或者授权方/卖方处分权利存在瑕疵导致被授权方/买方无法正常行使被授权或使用权利的被授权方/买方有权解除本协议并要求授权方/卖方赔偿因第三方索赔导致被授权方/买方支出的诉讼仲裁成本向第三方支付的赔偿等全部损失
</text>
<text class="trade_p">
7.2 任何一方有其他违反本协议情形的应赔偿守约方全部损失该损失包括但不限于对守约方所造成的直接损失可得利益损失守约方支付给第三方的赔偿费用/违约金/罚款调查取证费用/公证费诉讼费用律师费用以及因此而支付的其他合理费用
</text>
<text class="trade_p">
7.3在协议生效后交易双方应按时履行付款义务或交割义务非特殊情况不得随意撤销交易任一方不按约履行付款义务或交割义务或随意撤销交易另一方有权要求违约方赔偿全部损失该损失包括但不限于对守约方所造成的直接损失可得利益损失守约方支付给第三方的赔偿费用/违约金/罚款调查取证费用/公证费诉讼费用律师费用以及因此而支付的其他合理费用
</text>
<text class="trade_bold">争议解决</text>
<text class="trade_p trade_bold decora_line">
本协议的签署地点为中华人民共和国深圳市福田区因本协议以及本协议项下订单/附件/补充协议等如有引起或有关的任何争议由协议各方协商解决也可由有关部门调解协商或调解不成的任何一方可向深圳市福田区人民法院诉讼解决
</text>
<text class="trade_bold">协议生效</text>
<text class="trade_p">9.1本协议自您勾选确认后生效</text>
<text class="trade_p trade_bold decora_line">
9.2本协议生效即表示您主动接受本协议的各项约定并愿意就违反本协议约定承担相应的法律责任现有的协议约定也不能保证完全符合未来发展的需求因此平台发布的文化大数据交易规则及相关配套规定管理制度及相关声明均为本协议的补充约定与本协议不可分割且具有同等法律效力经平台公布即生效如您使用平台服务或参与文化大数据交易活动视为被授权方/买方同意上述补充约定
</text>
<text class="trade_p">
9.3您须知本协议中任何条款被废止无效或因任何理由不可执行不影响任何其它条款的有效性和可执行性
</text>
<text class="trade_p">
9.4平台保留在法律框架下对本协议的解释权和修订权
</text>
<text class="trade_bold decora_line">
特别提示您在进行交易之前请您务必审慎阅读并充分理解本协议各条款内容特别是涉及免除或者限制责任的条款对权利进行限制的条款争议解决条款等其中免除或者限制责任条款将以加粗加下划线等形式提示您注意您应重点阅读
</text>
<text class="trade_bold decora_line">
如您自主选择进行交易的即视为您已充分理解本协议完全同意本协议各项内容并同意作为本协议的一方当事人接受本协议及相关协议和规则的约束
</text>
<text class="trade_p">
以下无正文
</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.privacy{
width: 100%;
// min-height: 100vh;
overflow-y: auto;
.prizone{
padding: 12rpx;
line-height: 1.6;
text-indent: 32rpx;
text{
display: block;
}
.pri_h{
font-size: 42rpx;
font-weight: 600;
}
.trade_p{
font-size: 32rpx;
}
.trade_bold{
font-size: 34rpx;
font-weight: 600;
}
.trade_p_nobold{
padding-left: 12rpx;
text-indent: 36rpx;
}
}
}
</style>

4
pages/login/components/WhPopup.vue

@ -17,6 +17,8 @@
<business v-else-if="mkey=='business'"></business> <business v-else-if="mkey=='business'"></business>
<!--免责协议--> <!--免责协议-->
<escapeclause v-else-if="mkey=='escapeclause'"></escapeclause> <escapeclause v-else-if="mkey=='escapeclause'"></escapeclause>
<!--文化数据交易协议-->
<purchase v-else-if="mkey=='purchase'"></purchase>
</scroll-view> </scroll-view>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
@ -36,6 +38,7 @@
import commission from '@/pages/help/commission' import commission from '@/pages/help/commission'
import business from '@/pages/help/business' import business from '@/pages/help/business'
import escapeclause from '@/pages/help/escapeclause' import escapeclause from '@/pages/help/escapeclause'
import purchase from '@/pages/help/purchase'
export default { export default {
components: { components: {
@ -45,6 +48,7 @@
commission, commission,
business, business,
escapeclause, escapeclause,
purchase,
}, },
props: { props: {

35
pages/user/index.vue

@ -10,12 +10,12 @@
</view> </view>
<view class="user-content"> <view class="user-content">
<!-- 会员昵称 --> <!-- 会员昵称 -->
<view class="nick-name oneline-hide">{{ userInfo.username }}</view> <!-- <view class="nick-name oneline-hide">{{ userInfo.username }}</view>-->
<!-- 会员无等级时显示手机号 --> <!-- 会员无等级时显示手机号 -->
<view class="mobile">{{ userInfo.cellPhone }} ({{ userInfo.username }}) </view> <view class="mobile">{{ userInfo.cellPhone }} ({{ userInfo.username }}) </view>
<!-- 会员类型 --> <!-- 会员类型 -->
<view class="utype">{{userInfo.userType}}</view> <view v-if="validateVerify()" class="utype">{{userInfo.userType}}</view>
</view> </view>
</view> </view>
@ -68,10 +68,17 @@
<!-- 发票管理 --> <!-- 发票管理 -->
<view class="order-navbar-item"> <view class="order-navbar-item">
<view class="item-icon"> <view class="item-icon">
<text class="iconfont icon-qpdingdan"></text> <text class="iconfont icon-qpdingdan" @click="billManage"></text>
</view> </view>
<view class="item-name"> 发票管理</view> <view class="item-name"> 发票管理</view>
</view> </view>
<!-- 购物车 -->
<view class="order-navbar-item" @click="shopCart">
<view class="item-icon">
<text class="iconfont icon-cart"></text>
</view>
<view class="item-name"> 购物车</view>
</view>
</view> </view>
<!-- 操作日志 --> <!-- 操作日志 -->
@ -109,11 +116,13 @@
import * as UserApi from '@/api/user' import * as UserApi from '@/api/user'
import * as OrderApi from '@/api/order' import * as OrderApi from '@/api/order'
import { checkLogin } from '@/core/app' import { checkLogin } from '@/core/app'
import uniIcons from '../../uni_modules/uni-icons/components/uni-icons/uni-icons'
export default { export default {
components: { components: {
AvatarImage AvatarImage,
uniIcons,
}, },
data() { data() {
return { return {
@ -254,6 +263,22 @@
} }
return true return true
}, },
//
shopCart(){
if (this.validateVerify()) {
this.$navTo('pages/user/shopcart/index')
} else {
this.$error('未完成机构认证,请前往认证后查看')
}
},
//
billManage(){
if (this.validateVerify()) {
this.$navTo('pages/user/billManage/index')
} else {
this.$error('未完成机构认证,请前往认证后查看')
}
},
// //
handleLogin() { handleLogin() {

4
pages/user/mycertinfo/mycertinfo.vue

@ -64,7 +64,7 @@
// //
orgverify(){ orgverify(){
if (this.institutionsStr === '待缴费') { if (this.institutionsStr === '待缴费') {
this.$navTo("/pages/goods/payment/orderPayment") this.$navTo("/pages/goods/payment/verifyPayment")
} else { } else {
this.$navTo("pages/user/mycertinfo/orgverify") this.$navTo("pages/user/mycertinfo/orgverify")
} }
@ -72,7 +72,7 @@
// //
personverify(){ personverify(){
if (this.peopleStr === '待缴费') { if (this.peopleStr === '待缴费') {
this.$navTo("/pages/goods/payment/orderPayment") this.$navTo("/pages/goods/payment/verifyPayment")
} else { } else {
this.$navTo("pages/user/mycertinfo/personverify") this.$navTo("pages/user/mycertinfo/personverify")
} }

2
pages/user/mycertinfo/orgverify.vue

@ -1161,7 +1161,7 @@ export default {
}, },
jumpUrl() { jumpUrl() {
if (this.fee > 0) { if (this.fee > 0) {
uni.reLaunch({url: "/pages/goods/payment/orderPayment"}) uni.reLaunch({url: "/pages/goods/payment/verifyPayment"})
} else { } else {
uni.reLaunch({url: "/pages/user/index"}) uni.reLaunch({url: "/pages/user/index"})
} }

543
pages/user/shopcart/index.vue

@ -0,0 +1,543 @@
<template>
<view class="container">
<!-- 购物车商品列表 -->
<view v-if="list.length" class="cart-list">
<view class="cart-item" v-for="(item, index) in list" :key="index">
<view class="goods-name">
<label class="item-radio" @click.stop="handleCheckItem(item.goods_isli)">
<radio class="radio" color="#fa2209" :checked="inArray(item.goods_isli, checkedIds)" />
</label>
<view class="item-title" @click="handleGoodsList(item.username)">
<text class="item-title-name">委托方{{item.username}}</text>
</view>
<uni-icons class="item-del-inco" type="trash" size="30" @click="onClearCart(item.goods_isli)"></uni-icons>
</view>
<view class="item-content" @click="handleGoodsDetail(item.goods_islicode)">
<view class="goods-image">
<image class="image" :src="item.detail.goods_image" mode="scaleToFill"></image>
</view>
<view class="goods-title" @click="onTargetGoods(item.goods_id)">
<text class="goods-title-name">{{ item.detail.goods_name }}</text>
<text class="goods-title-content">交易方式{{ item.detail.goods_entrust?'转让':'授权' }}</text>
<text class="goods-title-content">购买年限{{ item.use_years }}</text>
<text class="goods-title-content">单价{{ item.goods_price }}</text>
</view>
<view class="item-foot">
<view class="goods-price">
<text>合计</text>
<text class="unit"></text>
<text class="value">{{ item.use_years * item.goods_price }}</text>
</view>
</view>
</view>
</view>
</view>
<!-- 购物车数据为空 -->
<empty-cart v-if="!list.length" :isLoading="isLoading" :custom-style="{ padding: '180rpx 50rpx' }" tips="购物车暂无标的">
<view slot="slot" class="empty-ipt" @click="onTargetIndex">
<text>去首页逛逛</text>
</view>
</empty-cart>
<!-- 底部操作栏 -->
<view v-if="list.length" class="footer-fixed">
<label class="all-radio" @click="handleCheckAll">
<radio class="radio" color="#fa2209" :checked="checkedIds.length > 0 && checkedIds.length === list.length" />
<text>全选</text>
</label>
<view class="total-info">
<text>合计</text>
<view class="goods-price">
<text class="unit"></text>
<text class="value">{{ totalPrice }}</text>
</view>
</view>
<view class="cart-action">
<view class="btn-wrapper">
<!-- dev:下面的disabled条件使用checkedIds.join方式判断 -->
<!-- dev:通常情况下vue项目使用checkedIds.length更合理, 但是length属性在微信小程序中不起作用 -->
<view v-if="mode == 'normal'" class="btn-item btn-main" :class="{ disabled: checkedIds.join() == '' && is_shop }" @click="handleOrder()">
<text>去结算 {{ checkedIds.length > 0 ? `(${checkedIds.length})` : '' }}</text>
</view>
<!-- <view v-if="mode == 'edit'" class="btn-item btn-main" :class="{ disabled: !checkedIds.length }" @click="handleDelete()">-->
<!-- <text>删除</text>-->
<!-- </view>-->
</view>
</view>
</view>
</view>
</template>
<script>
import { inArray, arrayIntersect, debounce } from '@/utils/util'
import { checkLogin, setCartTotalNum, setCartTabBadge } from '@/core/app'
import * as UserApi from '@/api/user'
import EmptyCart from '@/components/empty-cart'
import uniIcons from '../../../uni_modules/uni-icons/components/uni-icons/uni-icons'
import {createOrder, delShopCart} from "../../../api/user";
const CartIdsIndex = 'CartIds'
export default {
components: {
"empty-cart": EmptyCart,
"uni-icons": uniIcons,
},
data() {
return {
inArray,
//
isLoading: true,
// : normal edit
mode: 'normal',
//
list: [],
//
total: null,
// ID
checkedIds: [],
//
totalPrice: '0.00',
//
is_shop: false,
}
},
watch: {
//
checkedIds: {
handler(val) {
//
this.onCalcTotalPrice()
//
uni.setStorageSync(CartIdsIndex, val)
},
immediate: false
},
//
total(val) {
//
setCartTotalNum(val)
setCartTabBadge()
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
//
checkLogin() ? this.getCartList() : this.isLoading = false
//
this.checkedIds = uni.getStorageSync(CartIdsIndex) ? uni.getStorageSync(CartIdsIndex) : []
},
methods: {
// ()
onCalcTotalPrice() {
const app = this
//
const checkedList = app.list.filter(item => inArray(item.goods_isli, app.checkedIds))
//
let tempPrice = 0;
checkedList.forEach(item => {
// , 便 ()
const unitPrice = item.total_money * 100
tempPrice += unitPrice
})
app.totalPrice = (tempPrice / 100).toFixed(2)
},
//
getCartList() {
const app = this
app.isLoading = true
let param = {
user_isli: uni.getStorageSync("isliCode")
}
UserApi.getShopCart(param)
.then(result => {
if (result.code == '200') {
app.list = result.data
app.total = result.data.length
}
// checkedIdsID
app.onClearInvalidId()
})
.finally(() => app.isLoading = false)
},
// checkedIdsID
onClearInvalidId() {
const app = this
const listIds = app.list.map(item => item.id)
app.checkedIds = arrayIntersect(listIds, app.checkedIds)
},
//
handleToggleMode() {
this.mode = this.mode == 'normal' ? 'edit' : 'normal'
},
//
onTargetGoods(goodsId) {
this.$navTo('pages/goods/detail', { goodsId })
},
// ,
onTargetIndex() {
this.$navTo('pages/index/index')
},
//
handleCheckItem(cartId) {
const { checkedIds } = this
const index = checkedIds.findIndex(id => id === cartId)
index < 0 ? checkedIds.push(cartId) : checkedIds.splice(index, 1)
},
//
handleCheckAll() {
const { checkedIds, list } = this
this.checkedIds = checkedIds.length === list.length ? [] : list.map(item => item.goods_isli)
},
//
handleOrder() {
const app = this
if (app.checkedIds.length) {
let user_isli = uni.getStorageSync("isliCode")
let userType = uni.getStorageSync("userType")
if (user_isli) {
if (userType === "0") {
app.$toast('个人认证账号不能提交订单!')
} else {
let paramArr = {
manyislicode: [],
manyYears: [],
new_shop_Name: [],
new_userName: [],
new_company: []
}
for (let attr in app.list) {
let item = app.list[attr]
if (inArray(item.goods_isli, app.checkedIds)) {
paramArr.manyislicode.push(item.goods_islicode)
paramArr.manyYears.push(item.use_years)
//
if (item.goods_status != 1 && item.goods_status != 5) {
paramArr.new_shop_Name.push(item.detail.goods_name)
}
paramArr.new_userName.push(item.username)
if (item.username == "北京玖扬博文文化发展有限公司" && item.detail.charges_type == "1") {
paramArr.new_company.push(item.username)
}
}
}
let manyislicode = paramArr.manyislicode.join(",");//
let manyYears = paramArr.manyYears.join(",");
let new_shop_Name = paramArr.new_shop_Name.join(",");
let new_userName = paramArr.new_userName.join(","); //,,
let new_company = paramArr.new_company.join(","); //
//
let company_Number = null;
if (new_company.split(",").includes("北京玖扬博文文化发展有限公司")) {
company_Number = 1;
} else {
company_Number = null
}
//
let china_Number = null;
if (new_userName.split(",").includes("中国数字文化集团有限公司") || new_userName.split(",").includes("国家图书馆出版社有限公司") || new_userName.split(",").includes("深圳国夏文化数字科技有限公司")) {
china_Number = 1;
} else {
china_Number = null
}
if (company_Number == null) {
if (china_Number == null) { //
if (new_shop_Name == "") {
app.is_shop = false
let data = {
goods_isli: manyislicode, //
is_car: 1, //12
use_years: manyYears, //使
user_isli: user_isli //
}
UserApi.createOrder(data).then(res => {
if (res.resultCode === "00000000") {
app.$success('订单提交成功')
// 2
setTimeout(function () {
uni.reLaunch({url: "/pages/goods/payment/orderPayment?batchcode="+res.data.batchcode})
},1000)
app.getCartList();
app.onClearInvalidId()
} else {
app.is_shop = true
app.$error(res.resultMsg);
}
})
} else {
app.$toast('无法购买')
}
} else {
app.$toast('可议价商品暂不支持线上购买,如需议价请拨打电话:0755-88266899')
}
} else {
app.$toast('如需申领使用,请拨打电话 0755-88266899')
}
}
} else {
app.$toast('账号未认证,请进行认证!')
setTimeout(app.jumpMycertinfoUrl,3000)
}
} else {
app.$toast('请选择商品!')
}
},
//
jumpMycertinfoUrl () {
uni.navigateTo({
url:'/pages/user/mycertinfo/mycertinfo'
})
},
//
handleGoodsDetail(gislicode) {
// this.$toast(goodsId)
this.$navTo('pages/goods/detail', {gislicode})
},
//
handleGoodsList(spname) {
// this.$toast(goodsId)
this.$navTo("pages/goods/list?k="+spname+'&dt='+new Date().getTime())
},
//
//
onClearCart(goods_isli) {
const app = this
let param = {
user_isli: uni.getStorageSync("isliCode"),
goods_isli: goods_isli
}
UserApi.delShopCart(param).then(result => {
if (result.resultCode == '00000000') {
app.$success("删除成功!")
app.getCartList()
}
})
}
}
}
</script>
<style>
page {
background: #f5f5f5;
}
</style>
<style lang="scss" scoped>
//
.cart-list {
padding: 25rpx 16rpx 110rpx 16rpx;
}
.cart-item {
background: #fff;
border-radius: 12rpx;
display: block;
align-items: center;
padding: 0rpx 16rpx 40rpx 16rpx;
margin-bottom: 24rpx;
.goods-name {
width: 100%;
height: 78rpx;
padding: 0rpx 0rpx;
.item-radio {
font-size: 66rpx;
.radio {
transform: scale(0.76)
}
}
.item-title {
width: 80%;
display: inline-block;
white-space: nowrap; /* 防止文本换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 使用省略符号 */
.item-title-name {
margin-left: 10rpx;
font-size: 32rpx;
}
}
.item-del-inco {
float: right;
margin-top: 10rpx;
}
}
.item-content {
width: 100%;
flex: 1;
padding-left: 24rpx;
.goods-image {
width: 200rpx;
height: 200rpx;
margin-top: 50rpx;
display: inline-block;
.image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.goods-title {
width: 66%;
margin-top: 0rpx;
font-size: 28rpx;
margin-left: 20rpx;
display: inline-block;
.goods-title-name {
height: 70rpx;
margin-top: -125rpx;
float: left;
text-overflow: ellipsis; /* 使用省略符号 */
}
.goods-title-content {
display: block;
color: #969493;
margin-top: 5rpx;
}
}
.item-foot {
text-align: right;
.goods-price {
margin-top: 40rpx;
vertical-align: bottom;
color: $uni-text-color-active;
font-size: 32rpx;
}
}
}
}
//
.empty-ipt {
width: 300rpx;
margin: 0 auto;
font-size: 28rpx;
height: 74rpx;
line-height: 74rpx;
text-align: center;
color: #fff;
border-radius: 50rpx;
background: linear-gradient(to right, #1c223b, #1c223b);
}
//
.footer-fixed {
display: flex;
align-items: center;
height: 96rpx;
background: #fff;
padding: 0 30rpx;
position: fixed;
bottom: var(--window-bottom);
left: 0;
right: 0;
z-index: 11;
.all-radio {
width: 140rpx;
display: flex;
align-items: center;
.radio {
margin-bottom: -4rpx;
transform: scale(0.76)
}
}
.total-info {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30rpx;
.goods-price {
vertical-align: bottom;
color: #fa2209;
.unit {
font-size: 24rpx;
}
.value {
font-size: 32rpx;
}
}
}
.cart-action {
width: 200rpx;
.btn-wrapper {
height: 100%;
display: flex;
align-items: center;
}
.btn-item {
flex: 1;
font-size: 28rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
color: #fff;
border-radius: 50rpx;
}
//
.btn-main {
background: linear-gradient(to right, #1c223b, #1c223b);
//
&.disabled {
background: #9F9F9F;
display: none;
}
}
}
}
</style>

BIN
static/tabbar/cart_empty.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Loading…
Cancel
Save