作者 燕成杰

Merge branch 'master' of http://114.215.101.231:8099/yanchengjie/Bitcoin into yan

... ... @@ -12,10 +12,10 @@
if (!openId && !e.query.code) {
console.log('获取code');
getApp().authorization()
// getApp().authorization()
} else if (e.query.code) {
console.log(2);
getApp().getOpenid(e.query.code)
// getApp().getOpenid(e.query.code)
}
// else {
// uni.showModal({
... ...
... ... @@ -21,7 +21,7 @@
<!-- #ifndef APP-NVUE -->
<u-index-anchor :text="indexList[index]"></u-index-anchor>
<!-- #endif -->
<view class="list-cell" v-for="(cell, index) in item" @click="tolist(cell.name)">
<view class="list-cell" v-for="(cell, index) in item" @click="tolist(cell.id)">
<image :src="cell.image_preview" mode=""></image>
{{cell.name}}
</view>
... ... @@ -64,7 +64,7 @@
//跳转列表
tolist(e) {
uni.navigateTo({
url: "/pages/index/product?ktext="+e
url: "/pages/index/product?sort_id="+e
})
},
//分类列表
... ...
... ... @@ -51,14 +51,20 @@
</view>
<view class="namelast">
{{detail.seller_mobile}}
</view>
<view style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;" v-if="detail.seller_mobile">
<a :href="'tel:' + detail.seller_mobile" >拨号</a>
</view>
</view>
<view class="missbar flexA">
<view class="missbar flexA" >
<view class="name">
钱包地址:
</view>
<view class="namelast">
{{detail.package_add}}
</view>
<view @click="copy(detail.package_add)" style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;">
复制
</view>
</view>
<view class="missbar flexA">
... ... @@ -67,6 +73,9 @@
</view>
<view class="namelast">
{{detail.wechat_num}}
</view>
<view @click="copy(detail.wechat_num)" style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;">
复制
</view>
</view>
</view>
... ... @@ -192,6 +201,18 @@
this.report_list()
},
methods: {
//复制
copy(it) {
uni.setClipboardData({
data: it,
success: () => {
uni.showToast({
icon: 'none',
title: '复制成功'
});
}
});
},
goHome(){
uni.reLaunch({
url:'/pages/index/index'
... ... @@ -490,6 +511,10 @@
font-size: 28rpx;
font-weight: 400;
font-family: "PingFang SC";
}
a{
text-decoration: none;
color: deepskyblue;
}
}
}
... ...
... ... @@ -4,7 +4,7 @@
<image src="/static/ic_logo.png" mode=""></image>
<view class="search" @click="gosourch">
<view class="tosear" >
<input type="text" @click="gosourch" value="" placeholder="搜索" disabled="true"
<input type="text" value="" placeholder="搜索"
placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" />
<image src="/static/icon-search.png" mode=""></image>
</view>
... ... @@ -19,7 +19,7 @@
</view>
<view class="contail">
<view class="nev">
<view class="bar" v-for="(item,index) in categoryList" :key="index" @click="tocate(item.name)">
<view class="bar" v-for="(item,index) in categoryList" :key="index" @click="tocate(item.id)">
<image class="barimg" :src="item.image_preview" mode=""></image>
<text>{{item.name}}</text>
</view>
... ... @@ -158,9 +158,9 @@
url: "/pages/index/consultationDetails?id=" + e
})
},
tocate(name) {
tocate(id) {
uni.navigateTo({
url: "/pages/index/product?ktext="+name
url: "/pages/index/product?sort_id="+id
})
},
toallCate(){
... ... @@ -283,6 +283,7 @@
},
//跳转搜索
gosourch() {
console.log(2)
uni.navigateTo({
url: "/pages/index/search"
})
... ...
<template>
<view class="product_all">
<view class="top">
<image src="../../static/ic-back-false.png" mode="" @click="back"></image>
<view class="search">
<view class="tosear">
<input type="text" value="" placeholder="搜索"
placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);"
v-model="keyword" @confirm="gosourch"/>
<image src="../../static/icon-search.png" mode="" v-if="!keyword"></image>
</view>
</view>
<template>
<view class="product_all">
<view class="top">
<image src="../../static/ic-back-false.png" mode="" @click="back"></image>
<view class="search">
<view class="tosear">
<input type="text" value="" placeholder="搜索"
placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);"
v-model="keyword" @confirm="gosourch" />
<image src="../../static/icon-search.png" mode="" v-if="!keyword"></image>
</view>
</view>
</view>
<u-empty marginTop ="200" text="暂无数据" mode="data" v-if="!list.length"></u-empty>
<scroll-view v-if="list.length" scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh">
<view class="misslist">
<custom-waterfalls-flow :value="list" @wapperClick="godetail" @imageClick="godetail">
<template v-slot:default="item">
<view class="item">
<view class="title">{{item.name}}</view>
<view class="types">
所属分类:{{item.sort.name}}
</view>
<view class="desc">
<text v-if="item.seller_name">{{item.seller_name}}</text>
<view class="money">
<text>¥</text>{{item.price}}
</view>
</view>
</view>
</template>
</custom-waterfalls-flow>
</view>
<u-empty marginTop="200" text="暂无数据" mode="data" v-if="!list.length"></u-empty>
<scroll-view v-if="list.length" scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh">
<view class="misslist">
<custom-waterfalls-flow :value="list" @wapperClick="godetail" @imageClick="godetail">
<template v-slot:default="item">
<view class="item">
<view class="title">{{item.name}}</view>
<view class="types">
所属分类:{{item.sort.name}}
</view>
<view class="desc">
<text v-if="item.seller_name">{{item.seller_name}}</text>
<view class="money">
<text>¥</text>{{item.price}}
</view>
</view>
</view>
</template>
</custom-waterfalls-flow>
</view>
</scroll-view>
</view>
</template>
<script>
import {
product_list
} from '@/api/index'
export default {
data() {
return {
//瀑布
list: [],
keyword: "",
currentpage: 1,
}
},
onLoad(options) {
this.keyword = options.ktext
this.product_list(true)
},
</view>
</template>
<script>
import {
product_list
} from '@/api/index'
export default {
data() {
return {
//瀑布
list: [],
keyword: "",
currentpage: 1,
sort_id: "",
}
},
onLoad(options) {
if (options.ktext) {
this.keyword = options.ktext
}
if (options.sort_id) {
this.sort_id = options.sort_id
}
this.product_list(true)
},
methods: {
gosourch(){
gosourch() {
this.product_list(true)
},
scrolltolower() {
this.currentpage++
this.product_list()
},
back() {
uni.navigateBack({
delta: 1
})
},
//产品列表
async product_list(x) {
let obj = {
keyword: this.keyword,
page: this.currentpage,
pagenum: 15,
}
try {
const res = await product_list(obj)
console.log('产品列表', res)
this.list = x ? res.list.data : this.list.concat(res.list.data)
this.list.forEach((item, index) => {
item.image = item.images_preview[0]
})
if (res.list.data.length == 0) {
// uni.showToast({
// title: "暂无更多数据",
// icon: 'none'
// })
return
}
console.log('产品列表', this.list)
// 保存数据
} catch (err) {
uni.showToast({
title: err,
icon: 'none'
})
console.log('product_list', err)
}
},
scrolltolower() {
this.currentpage++
this.product_list()
},
back() {
uni.navigateBack({
delta: 1
})
},
//产品列表
async product_list(x) {
let obj = {
keyword: this.keyword,
sort_id: this.sort_id,
page: this.currentpage,
pagenum: 15,
}
try {
const res = await product_list(obj)
console.log('产品列表', res)
this.list = x ? res.list.data : this.list.concat(res.list.data)
this.list.forEach((item, index) => {
item.image = item.images_preview[0]
})
if (res.list.data.length == 0) {
// uni.showToast({
// title: "暂无更多数据",
// icon: 'none'
// })
return
}
console.log('产品列表', this.list)
// 保存数据
} catch (err) {
uni.showToast({
title: err,
icon: 'none'
})
console.log('product_list', err)
}
},
//跳转详情
godetail(item) {
... ... @@ -103,113 +110,113 @@
uni.navigateTo({
url: "/pages/index/detail?id=" + item.id
})
},
}
}
</script>
<style lang="scss">
page {
background: rgba(246, 246, 246, 1);
}
.product_all {
.top {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 99;
height: 96rpx;
opacity: 1;
background: rgba(255, 255, 255, 1);
padding: 16rpx 32rpx;
display: flex;
box-sizing: border-box;
align-items: center;
image {
margin-right: 32rpx;
width: 48rpx;
height: 48rpx;
}
.search {
flex: 1;
display: flex;
align-items: center;
.tosear {
position: relative;
width: 522rpx;
height: 64rpx;
border-radius: 38rpx;
opacity: 1;
border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
background: rgba(245, 245, 245, 1);
padding: 0 32rpx;
input {
text-align: center;
width: 100%;
height: 100%;
}
image {
position: absolute;
left: 280rpx;
top: 50%;
left: 36%;
transform: translateY(-50%);
width: 32rpx;
height: 32rpx;
}
}
}
}
.misslist {
margin-top: 104rpx;
.item {
padding: 24rpx;
box-sizing: border-box;
.types {
margin-top: 8rpx;
color: rgba(0, 0, 0, 0.6);
font-size: 24rpx;
font-weight: 400;
font-family: "PingFang SC";
}
.desc {
margin-top: 14rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: rgba(0, 0, 0, 0.6);
font-size: 20rpx;
font-weight: 400;
font-family: "PingFang SC";
.money {
color: rgba(248, 83, 23, 1);
font-size: 32rpx;
font-weight: 700;
font-family: "Montserrat";
text {
font-size: 24rpx;
font-weight: 500;
}
}
}
}
}
}
},
}
}
</script>
<style lang="scss">
page {
background: rgba(246, 246, 246, 1);
}
.product_all {
.top {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 99;
height: 96rpx;
opacity: 1;
background: rgba(255, 255, 255, 1);
padding: 16rpx 32rpx;
display: flex;
box-sizing: border-box;
align-items: center;
image {
margin-right: 32rpx;
width: 48rpx;
height: 48rpx;
}
.search {
flex: 1;
display: flex;
align-items: center;
.tosear {
position: relative;
width: 522rpx;
height: 64rpx;
border-radius: 38rpx;
opacity: 1;
border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
background: rgba(245, 245, 245, 1);
padding: 0 32rpx;
input {
text-align: center;
width: 100%;
height: 100%;
}
image {
position: absolute;
left: 280rpx;
top: 50%;
left: 36%;
transform: translateY(-50%);
width: 32rpx;
height: 32rpx;
}
}
}
}
.misslist {
margin-top: 104rpx;
.item {
padding: 24rpx;
box-sizing: border-box;
.types {
margin-top: 8rpx;
color: rgba(0, 0, 0, 0.6);
font-size: 24rpx;
font-weight: 400;
font-family: "PingFang SC";
}
.desc {
margin-top: 14rpx;
display: flex;
align-items: center;
justify-content: space-between;
color: rgba(0, 0, 0, 0.6);
font-size: 20rpx;
font-weight: 400;
font-family: "PingFang SC";
.money {
color: rgba(248, 83, 23, 1);
font-size: 32rpx;
font-weight: 700;
font-family: "Montserrat";
text {
font-size: 24rpx;
font-weight: 500;
}
}
}
}
}
}
</style>
... ...
... ... @@ -80,7 +80,7 @@
async sort_list() {
console.log(this.type,"000")
let obj = {
type:2,
type:this.type,
keyword: this.keyword,
}
try {
... ...
... ... @@ -6,7 +6,7 @@
<image src="/static/2.png" mode=""></image>
<text>{{detail.buyer_name}}</text>
</view>
<view class="topbox">
<view class="topbox" @click="ondetail(detail.id)">
<view class="boxtop flexD">
<view class="order">
订单号:{{detail.order_no}}
... ... @@ -81,6 +81,12 @@
this.order_detail()
},
methods: {
//跳转详情
ondetail(item) {
uni.navigateTo({
url: "/pages/index/detail?id=" + item
})
},
//订单详情
async order_detail() {
try {
... ...