This commit is contained in:
parent
9377e4e869
commit
d4f75ca431
|
@ -64,7 +64,7 @@ export const durian = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易榴莲果
|
* 榴莲果挂买挂卖
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
consume(param) {
|
consume(param) {
|
||||||
|
@ -96,5 +96,29 @@ export const durian = {
|
||||||
data: param.data,
|
data: param.data,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取榴莲果交易列表
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getOrderList(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/coreplay/app/durian/consume`,
|
||||||
|
method: 'POST',
|
||||||
|
data: param.data,
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 交易榴莲果
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
orderSale(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/coreplay/app/durian/consume`,
|
||||||
|
method: 'POST',
|
||||||
|
data: param.data,
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export default durian
|
export default durian
|
|
@ -6,8 +6,8 @@ const config = {
|
||||||
// host: 'h5api',
|
// host: 'h5api',
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
host: 'http://chi9fe.natappfree.cc',
|
// host: 'http://g8rbs6.natappfree.cc',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -55,21 +55,16 @@
|
||||||
})
|
})
|
||||||
// 交易类型列表
|
// 交易类型列表
|
||||||
const typeList = reactive([{
|
const typeList = reactive([{
|
||||||
id: 1,
|
id: 9,
|
||||||
name: '挂买',
|
name: '挂买',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 8,
|
||||||
name: '挂卖',
|
name: '挂卖',
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
// 类型下标
|
// 类型下标
|
||||||
const typeIndex = ref(0)
|
const typeIndex = ref(0)
|
||||||
// 表单基本信息
|
|
||||||
class Form {
|
|
||||||
sellNum = ''
|
|
||||||
totalPrice = ''
|
|
||||||
}
|
|
||||||
// 表单
|
// 表单
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
sellNum: '',
|
sellNum: '',
|
||||||
|
@ -206,11 +201,11 @@
|
||||||
// 发布榴莲果交易信息
|
// 发布榴莲果交易信息
|
||||||
function release() {
|
function release() {
|
||||||
// 验证必填项
|
// 验证必填项
|
||||||
if (!form.fruitAmount) {
|
if (!form.sellNum) {
|
||||||
util.alert('请输入榴莲果数量')
|
util.alert('请输入榴莲果数量')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!form.fruitAmount) {
|
if (!form.totalPrice) {
|
||||||
util.alert('请输入总价')
|
util.alert('请输入总价')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -240,9 +235,11 @@
|
||||||
// 买方用户id
|
// 买方用户id
|
||||||
targetUserId: config[type].targetUserId,
|
targetUserId: config[type].targetUserId,
|
||||||
// 交易类型
|
// 交易类型
|
||||||
transactionType: 10,
|
transactionType: typeList[typeIndex].id,
|
||||||
// 榴莲果交易数量
|
// 榴莲果交易数量
|
||||||
fruitAmount: form.fruitAmount,
|
fruitAmount: form.sellNum,
|
||||||
|
// 总价
|
||||||
|
totalPrice:form.totalPrice,
|
||||||
// 对方姓名
|
// 对方姓名
|
||||||
name: `${form.first}${form.name}`,
|
name: `${form.first}${form.name}`,
|
||||||
// 对方账号
|
// 对方账号
|
||||||
|
@ -252,7 +249,6 @@
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code === 200) {
|
if (rs.code === 200) {
|
||||||
//
|
|
||||||
util.getPurse()
|
util.getPurse()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -334,8 +330,8 @@
|
||||||
<view class="footer rows plr30 shadow bfff">
|
<view class="footer rows plr30 shadow bfff">
|
||||||
<view class="f28">我的资产</view>
|
<view class="f28">我的资产</view>
|
||||||
<view class="f28 c666">
|
<view class="f28 c666">
|
||||||
<text class="wsn">积分:{{purse.score}}</text>
|
<text class="wsn">积分:{{(purse.score).toFixed(2)}}</text>
|
||||||
<text class="wsn ml40">榴莲果:{{purse.fruit}}</text>
|
<text class="wsn ml40">榴莲果:{{(purse.fruit).toFixed(2)}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -152,24 +152,24 @@ function handleReport() {
|
||||||
|
|
||||||
// 拉黑
|
// 拉黑
|
||||||
function handleBlack() {
|
function handleBlack() {
|
||||||
// let text = detail.isBlock ? '取消拉黑' : '拉黑'
|
let text = detail.isBlock ? '取消拉黑' : '拉黑'
|
||||||
// util.alert({
|
util.alert({
|
||||||
// content: `确认要${text}用户${detail.userNickname}吗?`,
|
content: `确认要${text}用户${detail.userNickname}吗?`,
|
||||||
// }).then(rs => {
|
}).then(rs => {
|
||||||
// let obj = {
|
let obj = {
|
||||||
// blockUserId: detail.id,
|
blockUserId: detail.id,
|
||||||
// status: detail.isBlock ? 1 : 0
|
status: detail.isBlock ? 1 : 0
|
||||||
// }
|
}
|
||||||
// api.mine.blockUser(obj).then(res => {
|
api.mine.blockUser(obj).then(res => {
|
||||||
// if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// util.alert('操作成功!')
|
util.alert('操作成功!')
|
||||||
// getUserinfo()
|
getUserinfo()
|
||||||
|
|
||||||
// // 关闭弹窗
|
// 关闭弹窗
|
||||||
// proxy.$refs.menuRef.close()
|
proxy.$refs.menuRef.close()
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 复制账号
|
// 复制账号
|
||||||
|
|
|
@ -50,17 +50,20 @@ function link(url) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function toCustomer() {
|
function toCustomer() {
|
||||||
let param = {};
|
|
||||||
param.type = 'C2C'
|
|
||||||
param.name = `${props.detail.merName}`
|
|
||||||
param.msgId = `${rs.data.serviceId}`
|
|
||||||
param.isCustomer = true
|
|
||||||
|
|
||||||
util.toChat(param)
|
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: util.setUrl('/pages/news/chat/chat', param)
|
url: util.setUrl('/pages/mine/setting/feedback')
|
||||||
})
|
})
|
||||||
|
// let param = {};
|
||||||
|
// param.type = 'C2C'
|
||||||
|
// param.name = `${props.detail.merName}`
|
||||||
|
// param.msgId = `${rs.data.serviceId}`
|
||||||
|
// param.isCustomer = true
|
||||||
|
|
||||||
|
// util.toChat(param)
|
||||||
|
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: util.setUrl('/pages/news/chat/chat', param)
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,9 @@ import {
|
||||||
} from 'vite';
|
} from 'vite';
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
// let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
let target = 'http://chi9fe.natappfree.cc'
|
// let target = 'http://g8rbs6.natappfree.cc'
|
||||||
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue