@ -6,7 +6,7 @@ import { PayMethodEnum } from '@/common/enum/payment'
* 发起支付请求 (用于H5)
* @param {Object} option 参数
*/
const paymentAsH5 = option => {
export const paymentAsH5 = option => {
const options = { formHtml: '', ...option }
// 跳转到支付宝支付页
return new Promise((resolve, reject) => {
@ -16,7 +16,10 @@
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
<text>综合</text>
</view>
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
<view class="sort-item" :class="{ active: sortType === 'category' }" @click="changeCategory">
<text>{{ categoryText }}</text>
<text>销量</text>
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }"
@ -180,7 +183,10 @@
},
// 数量要大于4条才显示无更多数据
noMoreSize: 4,
}
mainCategoryId: 0, // 主分类id
categoryText: '全部分类',
childCategoryList: []
@ -286,6 +292,10 @@
app.mescroll.resetUpScroll()
changeCategory(category){
// 切换列表显示方式
handleShowView() {
const app = this
@ -399,8 +399,8 @@
console.log('logut')
})
uni.getStorageSync('t_id', options.id)
uni.getStorageSync('t_token', options.token)
uni.setStorageSync('t_id', options.id)
uni.setStorageSync('t_token', options.token)
_this.getUserInfo(options.id, options.token)
@ -401,7 +401,10 @@
content: '确认要取消该订单吗?',
success(o) {
if (o.confirm) {
OrderApi.cancel(orderId)
OrderApi.cancel(orderId, {
token: uni.getStorageSync('t_token'),
userId: uni.getStorageSync('t_id'),
.then(result => {
// 显示成功信息
app.$toast(result.message)