Browse Source

修改资讯中心

master
liaoxinyu 2 years ago
parent
commit
83e6572ac0
  1. 24
      api/goods.js
  2. 6
      pages.json
  3. 36
      pages/category/economybusiness/list.vue
  4. 3
      pages/category/index.vue
  5. 34
      pages/category/tradingentity/list.vue
  6. 3
      pages/goods/detail.scss
  7. 2
      pages/goods/detail.vue
  8. 12
      pages/goods/list.vue
  9. 11
      pages/goods/payment/orderPayment.vue
  10. 5
      pages/user/index.vue

24
api/goods.js

@ -99,13 +99,29 @@ export const getRankingList = (param) => {
} }
// 缴费订单列表 // 缴费订单列表
export const orderPaymentList = (data) => { export const orderPaymentList = (param) => {
return request.post(api.orderPaymentList,data) let option={header:{
"Content-Type":"application/x-www-form-urlencoded"
}}
let paramArr = [];
for (let key in param) {
paramArr.push(key + '=' + param[key])
}
let paramStr = '?' + paramArr.join('&')
return request.post(api.orderPaymentList+paramStr,{},option)
} }
// 订单确认支付 // 订单确认支付
export const userOrderpay = (data) => { export const userOrderpay = (param) => {
return request.post(api.userOrderpay,data) let option={header:{
"Content-Type":"application/x-www-form-urlencoded"
}}
let paramArr = [];
for (let key in param) {
paramArr.push(key + '=' + param[key])
}
let paramStr = '?' + paramArr.join('&')
return request.post(api.userOrderpay+paramStr,{},option)
} }
// 排行榜销售量 // 排行榜销售量
export const marketleader = (data) => { export const marketleader = (data) => {

6
pages.json

@ -129,7 +129,7 @@
"path": "pages/goods/detail", "path": "pages/goods/detail",
"style": { "style": {
"navigationBarTitleText": "标的详情", "navigationBarTitleText": "标的详情",
"navigationStyle": "custom" "enablePullDownRefresh": true
} }
}, },
{ {
@ -400,7 +400,7 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "认证订单结算", "navigationBarTitleText" : "认证订单结算",
"enablePullDownRefresh" : true "enablePullDownRefresh" : false
} }
}, },
{ {
@ -408,7 +408,7 @@
"style" : "style" :
{ {
"navigationBarTitleText" : "订单结算", "navigationBarTitleText" : "订单结算",
"enablePullDownRefresh" : true "enablePullDownRefresh" : false
} }
}, },
{ {

36
pages/category/economybusiness/list.vue

@ -29,7 +29,7 @@
<view class="goods-auth-type"> <view class="goods-auth-type">
<text class="twoline-hide">{{ userList.authType }}</text> <text class="twoline-hide">{{ userList.authType }}</text>
</view> </view>
<view class="goods-auth-num"> <view class="goods-auth-num" v-if="total != ''">
<text class="twoline-hide">标的数量{{ total }}</text> <text class="twoline-hide">标的数量{{ total }}</text>
</view> </view>
</view> </view>
@ -136,7 +136,7 @@
}, },
], ],
targetTab: 1, targetTab: 1,
total: 0, total: '',
} }
}, },
@ -180,7 +180,7 @@
await app.getGoodsList(page.num) await app.getGoodsList(page.num)
.then(list => { .then(list => {
const curPageLen = list.data.length const curPageLen = list.data.length
const totalSize = list.data.total const totalSize = list.total
app.mescroll.endBySize(curPageLen, totalSize) app.mescroll.endBySize(curPageLen, totalSize)
}) })
.catch(() => app.mescroll.endErr()) .catch(() => app.mescroll.endErr())
@ -219,18 +219,26 @@
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
GoodsApi.nbgoods(param) GoodsApi.nbgoods(param)
.then(result => { .then(result => {
// if (result.data.length > 0) {
const newList = app.initList(result.data) //
app.total = result.data.total const newList = app.initList(result.data)
app.list.data = getMoreListData(newList, app.list, pageNo) app.total = result.data.total
app.userList = newList.data[0].user app.list.data = getMoreListData(newList, app.list, pageNo)
app.userList.stateStr = this.getUserStateStr(app.userList.state) app.userList = newList.data[0].user
app.userList.user_islicode = newList.data[0].user_islicode app.userList.stateStr = this.getUserStateStr(app.userList.state)
resolve(newList) app.userList.user_islicode = newList.data[0].user_islicode
resolve(newList)
} else {
app.$error('该店铺信息不存在,即将返回分类页面!')
setTimeout(app.jumpReturn,2000)
}
}) })
.catch(reject) .catch(reject)
}) })
}, },
jumpReturn() {
this.$navTo('pages/category/index',{curIndex: 3});
},
getUserStateStr(state){ getUserStateStr(state){
let str = '' let str = ''
if (state == "1" || state == "3" || state == "7" || state == "0") { if (state == "1" || state == "3" || state == "7" || state == "0") {
@ -317,8 +325,11 @@
.search-text { .search-text {
text-align: left; text-align: left;
float: left; float: left;
font-size: 20rpx;
margin-left: 20rpx; margin-left: 20rpx;
input {
font-size: 20rpx;
}
} }
.search-text-bu { .search-text-bu {
margin-right: 20rpx; margin-right: 20rpx;
@ -364,7 +375,6 @@
.goods-name { .goods-name {
height: 90rpx; height: 90rpx;
float: left;
} }
.goods-auth-type { .goods-auth-type {

3
pages/category/index.vue

@ -202,9 +202,10 @@
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad() { onLoad(options) {
// //
this.onRefreshPage() this.onRefreshPage()
this.curIndex = options.curIndex ? options.curIndex : 0
}, },
/** /**

34
pages/category/tradingentity/list.vue

@ -29,7 +29,7 @@
<view class="goods-auth-type"> <view class="goods-auth-type">
<text class="twoline-hide">{{ userList.authType }}</text> <text class="twoline-hide">{{ userList.authType }}</text>
</view> </view>
<view class="goods-auth-num"> <view class="goods-auth-num" v-if="total != ''">
<text class="twoline-hide">标的数量{{ total }}</text> <text class="twoline-hide">标的数量{{ total }}</text>
</view> </view>
</view> </view>
@ -136,7 +136,7 @@
}, },
], ],
targetTab: 1, targetTab: 1,
total: 0, total: '',
} }
}, },
@ -180,7 +180,7 @@
await app.getGoodsList(page.num) await app.getGoodsList(page.num)
.then(list => { .then(list => {
const curPageLen = list.data.length const curPageLen = list.data.length
const totalSize = list.data.total const totalSize = list.total
app.mescroll.endBySize(curPageLen, totalSize) app.mescroll.endBySize(curPageLen, totalSize)
}) })
.catch(() => app.mescroll.endErr()) .catch(() => app.mescroll.endErr())
@ -220,17 +220,25 @@
GoodsApi.nbgoods(param) GoodsApi.nbgoods(param)
.then(result => { .then(result => {
// //
const newList = app.initList(result.data) if (result.data.length > 0) {
app.total = result.data.total const newList = app.initList(result.data)
app.list.data = getMoreListData(newList, app.list, pageNo) app.total = result.data.total
app.userList = newList.data[0].user app.list.data = getMoreListData(newList, app.list, pageNo)
app.userList.stateStr = this.getUserStateStr(app.userList.state) app.userList = newList.data[0].user
app.userList.user_islicode = newList.data[0].user_islicode app.userList.stateStr = this.getUserStateStr(app.userList.state)
resolve(newList) app.userList.user_islicode = newList.data[0].user_islicode
resolve(newList)
} else {
app.$error('该店铺信息不存在,即将返回分类页面!')
setTimeout(app.jumpReturn,2000)
}
}) })
.catch(reject) .catch(reject)
}) })
}, },
jumpReturn() {
this.$navTo('pages/category/index',{curIndex: 4});
},
getUserStateStr(state){ getUserStateStr(state){
let str = '' let str = ''
if (state == "1" || state == "3" || state == "7" || state == "0") { if (state == "1" || state == "3" || state == "7" || state == "0") {
@ -317,8 +325,11 @@
.search-text { .search-text {
text-align: left; text-align: left;
float: left; float: left;
font-size: 20rpx;
margin-left: 20rpx; margin-left: 20rpx;
input {
font-size: 20rpx;
}
} }
.search-text-bu { .search-text-bu {
margin-right: 20rpx; margin-right: 20rpx;
@ -364,7 +375,6 @@
.goods-name { .goods-name {
height: 90rpx; height: 90rpx;
float: left;
} }
.goods-auth-type { .goods-auth-type {

3
pages/goods/detail.scss

@ -169,6 +169,9 @@
} }
} }
} }
.item-content-long{
margin-bottom: 90rpx;
}
} }
// 店铺详情 // 店铺详情

2
pages/goods/detail.vue

@ -44,7 +44,7 @@
</view> </view>
</view> </view>
<!-- 标的信息 --> <!-- 标的信息 -->
<view class="item-content b-f" v-if="tabKey === 1"> <view class="item-content b-f" v-if="tabKey === 1" :class="shopyear_show || talprice_show ? 'item-content-long' : '' ">
<view class="gdic"> <view class="gdic">
<text class="gdic-tit">标的名称</text> <text class="gdic-tit">标的名称</text>
<text class="gdic-txt">{{goods.goods_name}}</text> <text class="gdic-txt">{{goods.goods_name}}</text>

12
pages/goods/list.vue

@ -29,7 +29,7 @@
<view class="goods-auth-type"> <view class="goods-auth-type">
<text class="twoline-hide">{{ userList.authType }}</text> <text class="twoline-hide">{{ userList.authType }}</text>
</view> </view>
<view class="goods-auth-num"> <view class="goods-auth-num" v-if="total != ''">
<text class="twoline-hide">标的数量{{ total }}</text> <text class="twoline-hide">标的数量{{ total }}</text>
</view> </view>
</view> </view>
@ -131,7 +131,7 @@
}, },
], ],
targetTab: 1, targetTab: 1,
total: 0, total: '',
} }
}, },
@ -174,7 +174,7 @@
await app.getGoodsList(page.num) await app.getGoodsList(page.num)
.then(list => { .then(list => {
const curPageLen = list.data.length const curPageLen = list.data.length
const totalSize = list.data.total const totalSize = list.total
app.mescroll.endBySize(curPageLen, totalSize) app.mescroll.endBySize(curPageLen, totalSize)
}) })
.catch(() => app.mescroll.endErr()) .catch(() => app.mescroll.endErr())
@ -311,8 +311,11 @@
.search-text { .search-text {
text-align: left; text-align: left;
float: left; float: left;
font-size: 20rpx;
margin-left: 20rpx; margin-left: 20rpx;
input {
font-size: 20rpx;
}
} }
.search-text-bu { .search-text-bu {
margin-right: 20rpx; margin-right: 20rpx;
@ -358,7 +361,6 @@
.goods-name { .goods-name {
height: 90rpx; height: 90rpx;
float: left;
} }
.goods-auth-type { .goods-auth-type {

11
pages/goods/payment/orderPayment.vue

@ -29,9 +29,8 @@
<uni-td align="center"> <uni-td align="center">
<image v-if="item.order_detail[0].goods_image" class="td-image" :src="item.order_detail[0].goods_image"></image> <image v-if="item.order_detail[0].goods_image" class="td-image" :src="item.order_detail[0].goods_image"></image>
<image v-else-if="img" class="td-image" :src="img"></image> <image v-else-if="img" class="td-image" :src="img"></image>
<image v-else class="td-image" :src="Comment.getDefaultImage"></image>
</uni-td> </uni-td>
<uni-td align="center">{{ item.buy_username }}</uni-td> <uni-td align="center">{{ item.order_detail[0].goods_name }}</uni-td>
<uni-td align="center">{{ item.buy_islicode }}</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.price_type}}</uni-td>
<uni-td align="center">{{ item.goods_entrust }}</uni-td> <uni-td align="center">{{ item.goods_entrust }}</uni-td>
@ -76,7 +75,6 @@
import * as GoodsApi from '@/api/goods' import * as GoodsApi from '@/api/goods'
import * as VerifyApi from '@/api/verify' import * as VerifyApi from '@/api/verify'
import * as Comment from '@/api/order/comment'
import uniTable from "@/uni_modules/uni-table/components/uni-table/uni-table" 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 uniTr from "@/uni_modules/uni-table/components/uni-tr/uni-tr"
import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th" import uniTh from "@/uni_modules/uni-table/components/uni-th/uni-th"
@ -176,7 +174,7 @@ export default {
getTableList(pageNo = 1) { getTableList(pageNo = 1) {
const app = this const app = this
let param = { let param = {
user_isli : uni.getStorageSync("accountId"), user_isli : uni.getStorageSync("isliCode"),
user_role : 1, user_role : 1,
batchcode : app.batchcode batchcode : app.batchcode
} }
@ -185,6 +183,7 @@ export default {
if (res.resultCode === "00000000" && res.data.length > 0) { if (res.resultCode === "00000000" && res.data.length > 0) {
app.loading = false app.loading = false
app.tableList = res.data app.tableList = res.data
app.good_money = res.data[0].total_money
app.handlerTableList() app.handlerTableList()
app.quantitySale(app.tableList[0].order_detail) app.quantitySale(app.tableList[0].order_detail)
} else { } else {
@ -221,8 +220,6 @@ export default {
item.small_count = app.handlerPrice(order_detail.price) item.small_count = app.handlerPrice(order_detail.price)
} }
item.money = app.handlerPrice(order_detail.money) item.money = app.handlerPrice(order_detail.money)
//
app.good_money += item.total_money
}) })
if (this.good_money > 20000) { if (this.good_money > 20000) {
@ -504,7 +501,7 @@ export default {
} }
.item-pay-con-bu { .item-pay-con-bu {
width: 200rpx; width: 240rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-left: 50rpx; margin-left: 50rpx;
border-radius: 15rpx; border-radius: 15rpx;

5
pages/user/index.vue

@ -205,13 +205,16 @@
app.isLogin = false app.isLogin = false
uni.clearStorageSync() uni.clearStorageSync()
resolve(null) resolve(null)
setTimeout(app.jumpLogin,2000)
} else { } else {
reject(err) reject(err)
} }
}) })
}) })
}, },
jumpLogin() {
this.$navTo('pages/login/index')
},
// //
getOplogsTodo() { getOplogsTodo() {
const app = this const app = this

Loading…
Cancel
Save