作者 卢胜

bug修改

@@ -12,10 +12,10 @@ @@ -12,10 +12,10 @@
12 12
13 if (!openId && !e.query.code) { 13 if (!openId && !e.query.code) {
14 console.log('获取code'); 14 console.log('获取code');
15 - getApp().authorization() 15 + // getApp().authorization()
16 } else if (e.query.code) { 16 } else if (e.query.code) {
17 console.log(2); 17 console.log(2);
18 - getApp().getOpenid(e.query.code) 18 + // getApp().getOpenid(e.query.code)
19 } 19 }
20 // else { 20 // else {
21 // uni.showModal({ 21 // uni.showModal({
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <!-- #ifndef APP-NVUE --> 21 <!-- #ifndef APP-NVUE -->
22 <u-index-anchor :text="indexList[index]"></u-index-anchor> 22 <u-index-anchor :text="indexList[index]"></u-index-anchor>
23 <!-- #endif --> 23 <!-- #endif -->
24 - <view class="list-cell" v-for="(cell, index) in item" @click="tolist(cell.name)"> 24 + <view class="list-cell" v-for="(cell, index) in item" @click="tolist(cell.id)">
25 <image :src="cell.image_preview" mode=""></image> 25 <image :src="cell.image_preview" mode=""></image>
26 {{cell.name}} 26 {{cell.name}}
27 </view> 27 </view>
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 //跳转列表 64 //跳转列表
65 tolist(e) { 65 tolist(e) {
66 uni.navigateTo({ 66 uni.navigateTo({
67 - url: "/pages/index/product?ktext="+e 67 + url: "/pages/index/product?sort_id="+e
68 }) 68 })
69 }, 69 },
70 //分类列表 70 //分类列表
@@ -51,14 +51,20 @@ @@ -51,14 +51,20 @@
51 </view> 51 </view>
52 <view class="namelast"> 52 <view class="namelast">
53 {{detail.seller_mobile}} 53 {{detail.seller_mobile}}
  54 + </view>
  55 + <view style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;" v-if="detail.seller_mobile">
  56 + <a :href="'tel:' + detail.seller_mobile" >拨号</a>
54 </view> 57 </view>
55 </view> 58 </view>
56 - <view class="missbar flexA"> 59 + <view class="missbar flexA" >
57 <view class="name"> 60 <view class="name">
58 钱包地址: 61 钱包地址:
59 </view> 62 </view>
60 <view class="namelast"> 63 <view class="namelast">
61 {{detail.package_add}} 64 {{detail.package_add}}
  65 + </view>
  66 + <view @click="copy(detail.package_add)" style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;">
  67 + 复制
62 </view> 68 </view>
63 </view> 69 </view>
64 <view class="missbar flexA"> 70 <view class="missbar flexA">
@@ -67,6 +73,9 @@ @@ -67,6 +73,9 @@
67 </view> 73 </view>
68 <view class="namelast"> 74 <view class="namelast">
69 {{detail.wechat_num}} 75 {{detail.wechat_num}}
  76 + </view>
  77 + <view @click="copy(detail.wechat_num)" style=" margin-left:8rpx; font-size: 26rpx; color: deepskyblue;">
  78 + 复制
70 </view> 79 </view>
71 </view> 80 </view>
72 </view> 81 </view>
@@ -192,6 +201,18 @@ @@ -192,6 +201,18 @@
192 this.report_list() 201 this.report_list()
193 }, 202 },
194 methods: { 203 methods: {
  204 + //复制
  205 + copy(it) {
  206 + uni.setClipboardData({
  207 + data: it,
  208 + success: () => {
  209 + uni.showToast({
  210 + icon: 'none',
  211 + title: '复制成功'
  212 + });
  213 + }
  214 + });
  215 + },
195 goHome(){ 216 goHome(){
196 uni.reLaunch({ 217 uni.reLaunch({
197 url:'/pages/index/index' 218 url:'/pages/index/index'
@@ -490,6 +511,10 @@ @@ -490,6 +511,10 @@
490 font-size: 28rpx; 511 font-size: 28rpx;
491 font-weight: 400; 512 font-weight: 400;
492 font-family: "PingFang SC"; 513 font-family: "PingFang SC";
  514 + }
  515 + a{
  516 + text-decoration: none;
  517 + color: deepskyblue;
493 } 518 }
494 } 519 }
495 } 520 }
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <image src="/static/ic_logo.png" mode=""></image> 4 <image src="/static/ic_logo.png" mode=""></image>
5 <view class="search" @click="gosourch"> 5 <view class="search" @click="gosourch">
6 <view class="tosear" > 6 <view class="tosear" >
7 - <input type="text" @click="gosourch" value="" placeholder="搜索" disabled="true" 7 + <input type="text" value="" placeholder="搜索"
8 placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" /> 8 placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);" />
9 <image src="/static/icon-search.png" mode=""></image> 9 <image src="/static/icon-search.png" mode=""></image>
10 </view> 10 </view>
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 </view> 19 </view>
20 <view class="contail"> 20 <view class="contail">
21 <view class="nev"> 21 <view class="nev">
22 - <view class="bar" v-for="(item,index) in categoryList" :key="index" @click="tocate(item.name)"> 22 + <view class="bar" v-for="(item,index) in categoryList" :key="index" @click="tocate(item.id)">
23 <image class="barimg" :src="item.image_preview" mode=""></image> 23 <image class="barimg" :src="item.image_preview" mode=""></image>
24 <text>{{item.name}}</text> 24 <text>{{item.name}}</text>
25 </view> 25 </view>
@@ -158,9 +158,9 @@ @@ -158,9 +158,9 @@
158 url: "/pages/index/consultationDetails?id=" + e 158 url: "/pages/index/consultationDetails?id=" + e
159 }) 159 })
160 }, 160 },
161 - tocate(name) { 161 + tocate(id) {
162 uni.navigateTo({ 162 uni.navigateTo({
163 - url: "/pages/index/product?ktext="+name 163 + url: "/pages/index/product?sort_id="+id
164 }) 164 })
165 }, 165 },
166 toallCate(){ 166 toallCate(){
@@ -283,6 +283,7 @@ @@ -283,6 +283,7 @@
283 }, 283 },
284 //跳转搜索 284 //跳转搜索
285 gosourch() { 285 gosourch() {
  286 + console.log(2)
286 uni.navigateTo({ 287 uni.navigateTo({
287 url: "/pages/index/search" 288 url: "/pages/index/search"
288 }) 289 })
1 -<template>  
2 - <view class="product_all">  
3 - <view class="top">  
4 - <image src="../../static/ic-back-false.png" mode="" @click="back"></image>  
5 - <view class="search">  
6 - <view class="tosear">  
7 - <input type="text" value="" placeholder="搜索"  
8 - placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);"  
9 - v-model="keyword" @confirm="gosourch"/>  
10 - <image src="../../static/icon-search.png" mode="" v-if="!keyword"></image>  
11 - </view>  
12 - </view> 1 +<template>
  2 + <view class="product_all">
  3 + <view class="top">
  4 + <image src="../../static/ic-back-false.png" mode="" @click="back"></image>
  5 + <view class="search">
  6 + <view class="tosear">
  7 + <input type="text" value="" placeholder="搜索"
  8 + placeholder-style="text-align: center;font-size: 28rpx; color: rgba(194,194,194,1);"
  9 + v-model="keyword" @confirm="gosourch" />
  10 + <image src="../../static/icon-search.png" mode="" v-if="!keyword"></image>
  11 + </view>
  12 + </view>
13 </view> 13 </view>
14 - <u-empty marginTop ="200" text="暂无数据" mode="data" v-if="!list.length"></u-empty>  
15 - <scroll-view v-if="list.length" scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh">  
16 - <view class="misslist">  
17 - <custom-waterfalls-flow :value="list" @wapperClick="godetail" @imageClick="godetail">  
18 - <template v-slot:default="item">  
19 - <view class="item">  
20 - <view class="title">{{item.name}}</view>  
21 - <view class="types">  
22 - 所属分类:{{item.sort.name}}  
23 - </view>  
24 - <view class="desc">  
25 - <text v-if="item.seller_name">{{item.seller_name}}</text>  
26 - <view class="money">  
27 - <text>¥</text>{{item.price}}  
28 - </view>  
29 - </view>  
30 - </view>  
31 - </template>  
32 - </custom-waterfalls-flow>  
33 - </view> 14 + <u-empty marginTop="200" text="暂无数据" mode="data" v-if="!list.length"></u-empty>
  15 + <scroll-view v-if="list.length" scroll-y="true" @scrolltolower="scrolltolower" style="height: 100vh">
  16 + <view class="misslist">
  17 + <custom-waterfalls-flow :value="list" @wapperClick="godetail" @imageClick="godetail">
  18 + <template v-slot:default="item">
  19 + <view class="item">
  20 + <view class="title">{{item.name}}</view>
  21 + <view class="types">
  22 + 所属分类:{{item.sort.name}}
  23 + </view>
  24 + <view class="desc">
  25 + <text v-if="item.seller_name">{{item.seller_name}}</text>
  26 + <view class="money">
  27 + <text>¥</text>{{item.price}}
  28 + </view>
  29 + </view>
  30 + </view>
  31 + </template>
  32 + </custom-waterfalls-flow>
  33 + </view>
34 </scroll-view> 34 </scroll-view>
35 -  
36 - </view>  
37 -</template>  
38 -  
39 -<script>  
40 - import {  
41 - product_list  
42 - } from '@/api/index'  
43 - export default {  
44 - data() {  
45 - return {  
46 - //瀑布  
47 - list: [],  
48 - keyword: "",  
49 - currentpage: 1,  
50 - }  
51 - },  
52 - onLoad(options) {  
53 - this.keyword = options.ktext  
54 - this.product_list(true)  
55 - }, 35 +
  36 + </view>
  37 +</template>
  38 +
  39 +<script>
  40 + import {
  41 + product_list
  42 + } from '@/api/index'
  43 + export default {
  44 + data() {
  45 + return {
  46 + //瀑布
  47 + list: [],
  48 + keyword: "",
  49 + currentpage: 1,
  50 + sort_id: "",
  51 + }
  52 + },
  53 + onLoad(options) {
  54 + if (options.ktext) {
  55 + this.keyword = options.ktext
  56 + }
  57 + if (options.sort_id) {
  58 + this.sort_id = options.sort_id
  59 + }
  60 + this.product_list(true)
  61 + },
56 methods: { 62 methods: {
57 - gosourch(){ 63 + gosourch() {
58 this.product_list(true) 64 this.product_list(true)
59 - },  
60 - scrolltolower() {  
61 - this.currentpage++  
62 - this.product_list()  
63 - },  
64 - back() {  
65 - uni.navigateBack({  
66 - delta: 1  
67 - })  
68 - },  
69 - //产品列表  
70 - async product_list(x) {  
71 - let obj = {  
72 - keyword: this.keyword,  
73 - page: this.currentpage,  
74 - pagenum: 15,  
75 - }  
76 - try {  
77 - const res = await product_list(obj)  
78 - console.log('产品列表', res)  
79 - this.list = x ? res.list.data : this.list.concat(res.list.data)  
80 - this.list.forEach((item, index) => {  
81 - item.image = item.images_preview[0]  
82 - })  
83 - if (res.list.data.length == 0) {  
84 - // uni.showToast({  
85 - // title: "暂无更多数据",  
86 - // icon: 'none'  
87 - // })  
88 - return  
89 - }  
90 - console.log('产品列表', this.list)  
91 - // 保存数据  
92 - } catch (err) {  
93 - uni.showToast({  
94 - title: err,  
95 - icon: 'none'  
96 - })  
97 - console.log('product_list', err)  
98 - } 65 + },
  66 + scrolltolower() {
  67 + this.currentpage++
  68 + this.product_list()
  69 + },
  70 + back() {
  71 + uni.navigateBack({
  72 + delta: 1
  73 + })
  74 + },
  75 + //产品列表
  76 + async product_list(x) {
  77 + let obj = {
  78 + keyword: this.keyword,
  79 + sort_id: this.sort_id,
  80 + page: this.currentpage,
  81 + pagenum: 15,
  82 + }
  83 + try {
  84 + const res = await product_list(obj)
  85 + console.log('产品列表', res)
  86 + this.list = x ? res.list.data : this.list.concat(res.list.data)
  87 + this.list.forEach((item, index) => {
  88 + item.image = item.images_preview[0]
  89 + })
  90 + if (res.list.data.length == 0) {
  91 + // uni.showToast({
  92 + // title: "暂无更多数据",
  93 + // icon: 'none'
  94 + // })
  95 + return
  96 + }
  97 + console.log('产品列表', this.list)
  98 + // 保存数据
  99 + } catch (err) {
  100 + uni.showToast({
  101 + title: err,
  102 + icon: 'none'
  103 + })
  104 + console.log('product_list', err)
  105 + }
99 }, 106 },
100 //跳转详情 107 //跳转详情
101 godetail(item) { 108 godetail(item) {
@@ -103,113 +110,113 @@ @@ -103,113 +110,113 @@
103 uni.navigateTo({ 110 uni.navigateTo({
104 url: "/pages/index/detail?id=" + item.id 111 url: "/pages/index/detail?id=" + item.id
105 }) 112 })
106 - },  
107 - }  
108 - }  
109 -</script>  
110 -  
111 -<style lang="scss">  
112 - page {  
113 - background: rgba(246, 246, 246, 1);  
114 - }  
115 -  
116 - .product_all {  
117 - .top {  
118 - position: fixed;  
119 - top: 0;  
120 - left: 0;  
121 - width: 100%;  
122 - z-index: 99;  
123 - height: 96rpx;  
124 - opacity: 1;  
125 - background: rgba(255, 255, 255, 1);  
126 - padding: 16rpx 32rpx;  
127 - display: flex;  
128 - box-sizing: border-box;  
129 - align-items: center;  
130 -  
131 - image {  
132 - margin-right: 32rpx;  
133 - width: 48rpx;  
134 - height: 48rpx;  
135 - }  
136 -  
137 - .search {  
138 - flex: 1;  
139 - display: flex;  
140 - align-items: center;  
141 -  
142 - .tosear {  
143 - position: relative;  
144 - width: 522rpx;  
145 - height: 64rpx;  
146 - border-radius: 38rpx;  
147 - opacity: 1;  
148 -  
149 - border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);  
150 - background: rgba(245, 245, 245, 1);  
151 - padding: 0 32rpx;  
152 -  
153 - input {  
154 - text-align: center;  
155 - width: 100%;  
156 - height: 100%;  
157 - }  
158 -  
159 - image {  
160 - position: absolute;  
161 - left: 280rpx;  
162 - top: 50%;  
163 - left: 36%;  
164 - transform: translateY(-50%);  
165 - width: 32rpx;  
166 - height: 32rpx;  
167 - }  
168 - }  
169 - }  
170 -  
171 - }  
172 -  
173 - .misslist {  
174 - margin-top: 104rpx;  
175 -  
176 - .item {  
177 - padding: 24rpx;  
178 - box-sizing: border-box;  
179 -  
180 - .types {  
181 - margin-top: 8rpx;  
182 - color: rgba(0, 0, 0, 0.6);  
183 - font-size: 24rpx;  
184 - font-weight: 400;  
185 - font-family: "PingFang SC";  
186 - }  
187 -  
188 - .desc {  
189 - margin-top: 14rpx;  
190 - display: flex;  
191 - align-items: center;  
192 - justify-content: space-between;  
193 - color: rgba(0, 0, 0, 0.6);  
194 - font-size: 20rpx;  
195 - font-weight: 400;  
196 - font-family: "PingFang SC";  
197 -  
198 - .money {  
199 -  
200 - color: rgba(248, 83, 23, 1);  
201 - font-size: 32rpx;  
202 - font-weight: 700;  
203 - font-family: "Montserrat";  
204 -  
205 - text {  
206 - font-size: 24rpx;  
207 - font-weight: 500;  
208 - }  
209 - }  
210 - }  
211 - }  
212 -  
213 - }  
214 - } 113 + },
  114 + }
  115 + }
  116 +</script>
  117 +
  118 +<style lang="scss">
  119 + page {
  120 + background: rgba(246, 246, 246, 1);
  121 + }
  122 +
  123 + .product_all {
  124 + .top {
  125 + position: fixed;
  126 + top: 0;
  127 + left: 0;
  128 + width: 100%;
  129 + z-index: 99;
  130 + height: 96rpx;
  131 + opacity: 1;
  132 + background: rgba(255, 255, 255, 1);
  133 + padding: 16rpx 32rpx;
  134 + display: flex;
  135 + box-sizing: border-box;
  136 + align-items: center;
  137 +
  138 + image {
  139 + margin-right: 32rpx;
  140 + width: 48rpx;
  141 + height: 48rpx;
  142 + }
  143 +
  144 + .search {
  145 + flex: 1;
  146 + display: flex;
  147 + align-items: center;
  148 +
  149 + .tosear {
  150 + position: relative;
  151 + width: 522rpx;
  152 + height: 64rpx;
  153 + border-radius: 38rpx;
  154 + opacity: 1;
  155 +
  156 + border: 0 solid rgba(0.5920000076293945, 0.5920000076293945, 0.5920000076293945, 1);
  157 + background: rgba(245, 245, 245, 1);
  158 + padding: 0 32rpx;
  159 +
  160 + input {
  161 + text-align: center;
  162 + width: 100%;
  163 + height: 100%;
  164 + }
  165 +
  166 + image {
  167 + position: absolute;
  168 + left: 280rpx;
  169 + top: 50%;
  170 + left: 36%;
  171 + transform: translateY(-50%);
  172 + width: 32rpx;
  173 + height: 32rpx;
  174 + }
  175 + }
  176 + }
  177 +
  178 + }
  179 +
  180 + .misslist {
  181 + margin-top: 104rpx;
  182 +
  183 + .item {
  184 + padding: 24rpx;
  185 + box-sizing: border-box;
  186 +
  187 + .types {
  188 + margin-top: 8rpx;
  189 + color: rgba(0, 0, 0, 0.6);
  190 + font-size: 24rpx;
  191 + font-weight: 400;
  192 + font-family: "PingFang SC";
  193 + }
  194 +
  195 + .desc {
  196 + margin-top: 14rpx;
  197 + display: flex;
  198 + align-items: center;
  199 + justify-content: space-between;
  200 + color: rgba(0, 0, 0, 0.6);
  201 + font-size: 20rpx;
  202 + font-weight: 400;
  203 + font-family: "PingFang SC";
  204 +
  205 + .money {
  206 +
  207 + color: rgba(248, 83, 23, 1);
  208 + font-size: 32rpx;
  209 + font-weight: 700;
  210 + font-family: "Montserrat";
  211 +
  212 + text {
  213 + font-size: 24rpx;
  214 + font-weight: 500;
  215 + }
  216 + }
  217 + }
  218 + }
  219 +
  220 + }
  221 + }
215 </style> 222 </style>
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 async sort_list() { 80 async sort_list() {
81 console.log(this.type,"000") 81 console.log(this.type,"000")
82 let obj = { 82 let obj = {
83 - type:2, 83 + type:this.type,
84 keyword: this.keyword, 84 keyword: this.keyword,
85 } 85 }
86 try { 86 try {
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <image src="/static/2.png" mode=""></image> 6 <image src="/static/2.png" mode=""></image>
7 <text>{{detail.buyer_name}}</text> 7 <text>{{detail.buyer_name}}</text>
8 </view> 8 </view>
9 - <view class="topbox"> 9 + <view class="topbox" @click="ondetail(detail.id)">
10 <view class="boxtop flexD"> 10 <view class="boxtop flexD">
11 <view class="order"> 11 <view class="order">
12 订单号:{{detail.order_no}} 12 订单号:{{detail.order_no}}
@@ -81,6 +81,12 @@ @@ -81,6 +81,12 @@
81 this.order_detail() 81 this.order_detail()
82 }, 82 },
83 methods: { 83 methods: {
  84 + //跳转详情
  85 + ondetail(item) {
  86 + uni.navigateTo({
  87 + url: "/pages/index/detail?id=" + item
  88 + })
  89 + },
84 //订单详情 90 //订单详情
85 async order_detail() { 91 async order_detail() {
86 try { 92 try {