Browse Source

修复01

master
“linchaomei” 3 years ago
parent
commit
b2ef575308
  1. 26
      App.vue
  2. 13
      api/index.js
  3. 14
      api/request.js
  4. 85
      common/common.scss
  5. 2
      common/scss/order.scss
  6. 3
      config.js
  7. 196
      js_sdk/mmmm-image-tools/index.js
  8. 11
      js_sdk/mmmm-image-tools/package.json
  9. 21
      manifest.json
  10. 82
      pages.json
  11. 14
      pages/account/addAddress.vue
  12. 2
      pages/account/address.vue
  13. 387
      pages/account/demo1.vue
  14. 7
      pages/account/favorites.vue
  15. 18
      pages/account/index.vue
  16. 6
      pages/account/message.vue
  17. 22
      pages/account/myCoupons.vue
  18. 2
      pages/account/myOrders.vue
  19. 26
      pages/account/pointsDetails.vue
  20. 8
      pages/account/wishlist.vue
  21. 4
      pages/category/index.vue
  22. 183
      pages/category/productList.vue
  23. 192
      pages/index/first.vue
  24. 79
      pages/index/flashSale.vue
  25. 543
      pages/index/index.vue
  26. 14
      pages/index/index2.vue
  27. 51
      pages/index/pickUpCentre.vue
  28. 5
      pages/index/search.vue
  29. 19
      pages/login/index.vue
  30. 5
      pages/order/confirmation.vue
  31. 2
      pages/order/details.vue
  32. 24
      pages/order/logisticsDetails.vue
  33. 37
      pages/productDetails/goodsReview.vue
  34. 244
      pages/productDetails/index.vue
  35. 96
      pages/productDetails/review.vue
  36. 97
      pages/shippingCart/index.vue
  37. 9
      pages/specialTitle/index.vue
  38. BIN
      static/icon/cat_white.png
  39. BIN
      static/icon/like_red.png
  40. BIN
      static/icon/right_white.png
  41. BIN
      static/icon/share_white.png
  42. BIN
      static/img/bottom1_white.png
  43. BIN
      static/img/delete_white.png
  44. BIN
      static/img/pets_nav_white.png
  45. BIN
      static/img/ptes_nav1_white.png
  46. BIN
      static/img/top_white.png

26
App.vue

@ -8,14 +8,9 @@
}, },
onLaunch: function() { onLaunch: function() {
// console.log('App Launch') // console.log('App Launch')
uni.onTabBarMidButtonTap(()=>{ setTimeout(() => {
uni.showTabBar() plus.navigator.closeSplashscreen();
uni.navigateTo({ }, 5000);
url:'/pages/index/index2'
})
})
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
@ -23,20 +18,7 @@
onHide: function() { onHide: function() {
// console.log('App Hide') // console.log('App Hide')
}, },
methods:{
onBack() {
this.backButtonPress++;
if (this.backButtonPress > 1) {
plus.runtime.quit();
} else {
plus.nativeUI.toast('Click again to exit');
}
setTimeout(function() {
this.backButtonPress = 0;
}, 1000);
return true;
},
}
} }
</script> </script>

13
api/index.js

@ -61,4 +61,17 @@ export const defaultRequest4 =query=>{
isEncryption:false, isEncryption:false,
isLoad:false isLoad:false
}) })
}
//上传图片
export const defaultRequest5 =(query,img)=>{
return httpRequest({
url:'mapi/api_v2011.php?appcode=DOPE+',
method:'post',
data:query,
afile:img,
errMsg:true,
isCookies:false,
isEncryption:false,
isLoad:true
})
} }

14
api/request.js

@ -5,9 +5,9 @@ import cryptoJS from "crypto-js"
const httpRequest = (params) => { const httpRequest = (params) => {
if(params.isLoad){ if(params.isLoad){
uni.showLoading({ // uni.showLoading({
// title: "努力加载中..." // title: "Loading..."
}); // });
} }
const json_data={ const json_data={
@ -63,9 +63,13 @@ const httpRequest = (params) => {
// console.info(res) // console.info(res)
uni.hideLoading(); uni.hideLoading();
// 进行解密 // 进行解密
res.data=JSON.parse(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008')) // let list = res.data
// res.data=JSON.parse(decryptDes(res.data,"6780f04cf2e211ec86a8005056c00008"))
res.data=JSON.parse(decryptDes(res.data,"6780f04cf2e211ec86a8005056c00008"))
// res.data=Base64.decode(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008')); // res.data=Base64.decode(decryptDes(res.data,'6780f04cf2e211ec86a8005056c00008'));
// console.info(res.data) // console.info(list)
// res.data = list
if(res.data.error!=0 && params.errMsg){ if(res.data.error!=0 && params.errMsg){
// uni.showToast({ // uni.showToast({
// // title: res.data.message, // // title: res.data.message,

85
common/common.scss

@ -1,9 +1,13 @@
.status_bar { .status_bar {
height: var(--status-bar-height); // height: var(--status-bar-height);
width: 100%; width: 100%;
height: 50rpx;
// background-color: #000000;
} }
.uni-bg-black{
background-color: #000000;
}
//地址信息 //地址信息
.address{ .address{
padding-top: 33.33rpx; padding-top: 33.33rpx;
@ -60,24 +64,65 @@
// 评价 // 评价
.reviews_item{ .reviews_item{
padding: 34rpx 0; padding: 34rpx 0;
border-bottom: 1px solid #E2E2E2; border-bottom: 0.1rpx solid #3b3b3b;
opacity: 0.7;
&:last-child{ &:last-child{
border-bottom: none; border-bottom: none;
} }
.reviews_item_title{ .reviews_item_title{
display: flex; display: flex;
align-items: center; // align-items: center;
justify-content: space-between; // justify-content: space-around;
.reviews_item_img{
height: 100rpx;
width: 100rpx;
// border-radius: 50%;
// margin-right: 2rpx;
image{
height: 100%;
width: 100%;
border-radius: 50%;
}
}
.reviews_title_one{
height: 100rpx;
width: 66vw;
}
.reviews_title_color{
font-size: 28rpx;
color:#fff;
height: 50rpx;
line-height: 50rpx;
padding-left: 15.37rpx;
}
.reviews_title_user{ .reviews_title_user{
font-size: 32rpx; font-size: 32rpx;
display: flex; height:50rpx;
align-items: center; width: 50vw;
color: #3D3D3D;
// margin-left: 10rpx;
line-height: 50rpx;
text-align: center;
display: flex;
overflow: hidden;
align-items: start;
// color: #ccc;
// background-color: #4F92F1;
padding:0;
text{ text{
display: inline-block; display: inline-block;
margin-right: 2rpx; margin-right: 2rpx;
text-align: center;
overflow: hidden;
}
.reviews_title_user_name{
max-width: 300rpx;
overflow: hidden;
margin-left: 13.37rpx;
margin-right: 13.37rpx;
} }
} }
@ -85,6 +130,9 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #909090; color: #909090;
margin-top: 8rpx;
margin-left: 50rpx;
} }
} }
.reviews_item_color{ .reviews_item_color{
@ -107,7 +155,12 @@
width: 233.33rpx; width: 233.33rpx;
height: 233.33rpx; height: 233.33rpx;
margin-left: 16.67rpx; margin-left: 16.67rpx;
background-color: #999999; // background-color: #999999;
background-size: 100% !important;
image{
height: 100%;
width: 100%;
}
&:first-child{ &:first-child{
margin-left: 0; margin-left: 0;
} }
@ -125,6 +178,7 @@
.order_popup_title{ .order_popup_title{
position: relative; position: relative;
color:#000;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #E2E2E2; border-bottom: 1px solid #E2E2E2;
@ -366,13 +420,18 @@
.recommend_content_item{ .recommend_content_item{
width: 340rpx; width: 340rpx;
margin-bottom: 46.67rpx; margin-bottom: 16.67rpx;
.recommend_content_name{
height: 80rpx;
line-height: 40rpx;
overflow: hidden;
font-size: 25rpx;
}
.recommend_content_item_image{ .recommend_content_item_image{
width: 100%; width: 100%;
height:340rpx ; height:340rpx ;
background-color: #999999; background-color: #999999;
margin-bottom: 37.33rpx; margin-bottom: 11.33rpx;
.recommend_content_item_image_name{ .recommend_content_item_image_name{
overflow: hidden; overflow: hidden;
@ -387,7 +446,7 @@
.recommend_content_item_pric{ .recommend_content_item_pric{
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-top: 34rpx; margin-top: 6rpx;
} }
} }
} }

2
common/scss/order.scss

@ -13,7 +13,7 @@
color: white; color: white;
font-size: 18.67rpx; font-size: 18.67rpx;
font-weight: bold; font-weight: bold;
border-top: 14.67rpx #F6F5FA solid; // border-top: 14.67rpx #F6F5FA solid;
.shipped_right_text{ .shipped_right_text{
width: 497.33rpx; width: 497.33rpx;

3
config.js

@ -1,4 +1,5 @@
var weburl='en.meixx.com'; // var weburl='en.meixx.com';
var weburl = 'lilbeattranapismits.dopeplus.com';
export default { export default {
apiUri: 'https://'+weburl+'/', apiUri: 'https://'+weburl+'/',
imgUri: 'http://'+weburl+'/', imgUri: 'http://'+weburl+'/',

196
js_sdk/mmmm-image-tools/index.js

@ -0,0 +1,196 @@
function getLocalFilePath(path) {
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
return path
}
if (path.indexOf('file://') === 0) {
return path
}
if (path.indexOf('/storage/emulated/0/') === 0) {
return path
}
if (path.indexOf('/') === 0) {
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
if (localFilePath !== path) {
return localFilePath
} else {
path = path.substr(1)
}
}
return '_www/' + path
}
function dataUrlToBase64(str) {
var array = str.split(',')
return array[array.length - 1]
}
var index = 0
function getNewFileId() {
return Date.now() + String(index++)
}
function biggerThan(v1, v2) {
var v1Array = v1.split('.')
var v2Array = v2.split('.')
var update = false
for (var index = 0; index < v2Array.length; index++) {
var diff = v1Array[index] - v2Array[index]
if (diff !== 0) {
update = diff > 0
break
}
}
return update
}
export function pathToBase64(path) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
if (typeof FileReader === 'function') {
var xhr = new XMLHttpRequest()
xhr.open('GET', path, true)
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status === 200) {
let fileReader = new FileReader()
fileReader.onload = function(e) {
resolve(e.target.result)
}
fileReader.onerror = reject
fileReader.readAsDataURL(this.response)
}
}
xhr.onerror = reject
xhr.send()
return
}
var canvas = document.createElement('canvas')
var c2x = canvas.getContext('2d')
var img = new Image
img.onload = function() {
canvas.width = img.width
canvas.height = img.height
c2x.drawImage(img, 0, 0)
resolve(canvas.toDataURL())
canvas.height = canvas.width = 0
}
img.onerror = reject
img.src = path
return
}
if (typeof plus === 'object') {
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
resolve(data.target.result)
}
fileReader.onerror = function(error) {
reject(error)
}
fileReader.readAsDataURL(file)
}, function(error) {
reject(error)
})
}, function(error) {
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
wx.getFileSystemManager().readFile({
filePath: path,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
base64 = base64.split(',')
var type = base64[0].match(/:(.*?);/)[1]
var str = atob(base64[1])
var n = str.length
var array = new Uint8Array(n)
while (n--) {
array[n] = str.charCodeAt(n)
}
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
}
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
if (extName) {
extName = extName[1]
} else {
reject(new Error('base64 error'))
}
var fileName = getNewFileId() + '.' + extName
if (typeof plus === 'object') {
var basePath = '_doc'
var dirPath = 'uniapp_temp'
var filePath = basePath + '/' + dirPath + '/' + fileName
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
entry.getDirectory(dirPath, {
create: true,
exclusive: false,
}, function(entry) {
entry.getFile(fileName, {
create: true,
exclusive: false,
}, function(entry) {
entry.createWriter(function(writer) {
writer.onwrite = function() {
resolve(filePath)
}
writer.onerror = reject
writer.seek(0)
writer.writeAsBinary(dataUrlToBase64(base64))
}, reject)
}, reject)
}, reject)
}, reject)
return
}
var bitmap = new plus.nativeObj.Bitmap(fileName)
bitmap.loadBase64Data(base64, function() {
bitmap.save(filePath, {}, function() {
bitmap.clear()
resolve(filePath)
}, function(error) {
bitmap.clear()
reject(error)
})
}, function(error) {
bitmap.clear()
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: dataUrlToBase64(base64),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}

11
js_sdk/mmmm-image-tools/package.json

@ -0,0 +1,11 @@
{
"id": "mmmm-image-tools",
"name": "image-tools",
"version": "1.4.0",
"description": "图像转换工具,可用于图像和base64的转换",
"keywords": [
"base64",
"保存",
"图像"
]
}

21
manifest.json

@ -1,5 +1,5 @@
{ {
"name" : "DOPE PLUS", "name" : "Dope Plus",
"appid" : "__UNI__A6CF3EA", "appid" : "__UNI__A6CF3EA",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@ -11,11 +11,22 @@
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender" : false,
"waiting" : true, "waiting" : false,
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },
// "splashscreen" : {
// "alwaysShowBeforeRender" : false,
// "autoclose" : false,
// "waiting" : false,
// "delay" : 0
// },
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
/* */ /* */
"modules" : { "modules" : {
"Payment" : {}, "Payment" : {},
@ -67,6 +78,10 @@
}, },
"splashscreen" : { "splashscreen" : {
"androidStyle" : "default", "androidStyle" : "default",
"alwaysShowBeforeRender" : false,
"autoclose" : false,
"waiting" : false,
"delay" : 0,
"android" : { "android" : {
"hdpi" : "unpackage/res/icons/dope2.png", "hdpi" : "unpackage/res/icons/dope2.png",
"xhdpi" : "unpackage/res/icons/dope2.png", "xhdpi" : "unpackage/res/icons/dope2.png",

82
pages.json

@ -1,5 +1,19 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/first",
"style": {
"navigationStyle":"custom",
"app-plus": {
"safearea":{
"background" : "none",
"bottom":{
"offset":"none"
}
}
}
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@ -74,14 +88,14 @@
"path": "pages/account/myProfile", "path": "pages/account/myProfile",
"style": { "style": {
"navigationBarTitleText": "My Profile", "navigationBarTitleText": "My Profile",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/account/settings", "path": "pages/account/settings",
"style": { "style": {
"navigationBarTitleText": "Settings", "navigationBarTitleText": "Settings",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
@ -102,48 +116,55 @@
{ {
"path": "pages/account/favorites", "path": "pages/account/favorites",
"style": { "style": {
"titleNView":false "titleNView":false,
"navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/account/message", "path": "pages/account/message",
"style": { "style": {
"titleNView":false "titleNView":false,
"navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/account/new", "path": "pages/account/new",
"style": { "style": {
"navigationBarTitleText": "nothing", "navigationBarTitleText": "nothing",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
"navigationBarTitleText": " ", "navigationStyle":"custom",
"navigationBarBackgroundColor":"#FFFFFF" "enablePullDownRefresh": false
// "navigationBarTitleText": " ",
// "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/login/verifyEmail", "path": "pages/login/verifyEmail",
"style": { "style": {
"navigationBarTitleText": "Verify Email Address", "navigationBarTitleText": "Verify Email Address",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/login/changePwd", "path": "pages/login/changePwd",
"style": { "style": {
"navigationBarTitleText": "Change Password", "navigationBarTitleText": "Change Password",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/account/myOrders", "path": "pages/account/myOrders",
"style": { "style": {
"navigationBarTitleText": "My orders", "navigationBarTitleText": "My orders",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
} }
}, },
{ {
@ -158,14 +179,14 @@
"path": "pages/order/confirmation", "path": "pages/order/confirmation",
"style": { "style": {
"navigationBarTitleText": "Order Confirmation", "navigationBarTitleText": "Order Confirmation",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/order/paypalWebview", "path": "pages/order/paypalWebview",
"style": { "style": {
"navigationBarTitleText": " ", "navigationBarTitleText": " ",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
@ -190,7 +211,7 @@
"path": "pages/order/paySuccess", "path": "pages/order/paySuccess",
"style": { "style": {
"navigationBarTitleText": "Pay success", "navigationBarTitleText": "Pay success",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor":"#000000",
"enablePullDownRefresh":true "enablePullDownRefresh":true
} }
}, },
@ -198,14 +219,14 @@
"path": "pages/account/address", "path": "pages/account/address",
"style": { "style": {
"navigationBarTitleText": "Shipping Address", "navigationBarTitleText": "Shipping Address",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/account/addAddress", "path": "pages/account/addAddress",
"style": { "style": {
"navigationBarTitleText": "Shipping Address", "navigationBarTitleText": "Shipping Address",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
@ -219,7 +240,7 @@
"path": "pages/order/details", "path": "pages/order/details",
"style": { "style": {
"navigationBarTitleText": "Order details", "navigationBarTitleText": "Order details",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
// "app-plus": { // "app-plus": {
// "titleNView": { // "titleNView": {
// "splitLine":{ // "splitLine":{
@ -234,21 +255,21 @@
"path": "pages/order/logisticsDetails", "path": "pages/order/logisticsDetails",
"style": { "style": {
"navigationBarTitleText": "Logistics details", "navigationBarTitleText": "Logistics details",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/order/refund", "path": "pages/order/refund",
"style": { "style": {
"navigationBarTitleText": "Refund", "navigationBarTitleText": "Refund",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
"path": "pages/order/refundDetails", "path": "pages/order/refundDetails",
"style": { "style": {
"navigationBarTitleText": "Refund Details", "navigationBarTitleText": "Refund Details",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
@ -256,7 +277,8 @@
"style": { "style": {
"titleNView":false, "titleNView":false,
"enablePullDownRefresh":true, "enablePullDownRefresh":true,
"navigationBarTextStyle":"white" // "navigationBarTextStyle":"white",
"navigationBarBackgroundColor": "#000000"
} }
@ -280,22 +302,24 @@
{ {
"path": "pages/productDetails/goodsReview", "path": "pages/productDetails/goodsReview",
"style": { "style": {
"navigationBarTitleText":"Review", "navigationBarTitleText":"Review"
"navigationBarBackgroundColor":"#FFFFFF"
} }
}, },
{ {
"path": "pages/account/myReview", "path": "pages/account/myReview",
"style": { "style": {
"navigationBarTitleText": "My Review", "navigationBarTitleText": "My Review",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "pages/account/demo1", "path": "pages/account/demo1",
"style": { "style": {
"navigationBarTitleText": "My demo", "navigationBarTitleText": "My demo",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor":"#000000"
} }
}, },
{ {
@ -307,7 +331,9 @@
{ {
"path": "pages/index/flashSale", "path": "pages/index/flashSale",
"style": { "style": {
"titleNView":false "titleNView":false,
"navigationBarBackgroundColor":"#000000",
"navigationBarTextStyle": "white"
} }
} }
,{ ,{
@ -321,8 +347,8 @@
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarBackgroundColor": "#000000",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "white",
"navigationBarTitleText": "DOPE PLUS" "navigationBarTitleText": "DOPE PLUS"
}, },
@ -357,7 +383,7 @@
"pagePath": "pages/shippingCart/index", "pagePath": "pages/shippingCart/index",
"iconPath": "static/img/Cart.png", "iconPath": "static/img/Cart.png",
"selectedIconPath": "static/img/cart1.png", "selectedIconPath": "static/img/cart1.png",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "#000000",
"text": "Cart" "text": "Cart"
}, },
{ {

14
pages/account/addAddress.vue

@ -214,6 +214,10 @@
}) })
return return
} }
else{
this.query.consignee.city_name = this.city
this.query.consignee.city = " 0 "
}
this.query.consignee.address=this.cityText+this.address this.query.consignee.address=this.cityText+this.address
}else{ }else{
if(this.query.consignee.city==0){ if(this.query.consignee.city==0){
@ -221,6 +225,7 @@
icon:'none', icon:'none',
title:'Please Select City/Town' title:'Please Select City/Town'
}) })
return return
} }
} }
@ -250,6 +255,7 @@
}) })
return return
} }
this.query.consignee.address = this.address this.query.consignee.address = this.address
console.info(this.query) console.info(this.query)
defaultRequest3(this.query,'consignee').then(res=>{ defaultRequest3(this.query,'consignee').then(res=>{
@ -279,8 +285,8 @@
defaultRequest2(data).then(res=>{ defaultRequest2(data).then(res=>{
let list =[] let list =[]
let listAll = [] let listAll = []
console.info(res) // console.info(res)
// console.log(this.countryText) // // console.log(this.countryText)
if(res.error==0){ if(res.error==0){
this.countryList=res.data this.countryList=res.data
if(this.countryText){ if(this.countryText){
@ -373,6 +379,8 @@
} }
else{ else{
this.isSelect1 = false this.isSelect1 = false
// this.query.consignee.city = 1
// this.query.consignee.city_name = this.city
} }
} }
}) })
@ -409,7 +417,7 @@
if(e.type==1){ if(e.type==1){
e.data=JSON.parse(e.data) e.data=JSON.parse(e.data)
// console.info(e.data) console.info(e.data)
this.query.consignee=e.data this.query.consignee=e.data
this.address = this.query.consignee.address this.address = this.query.consignee.address
if(e.data.default_address_id==e.data.address_id){ if(e.data.default_address_id==e.data.address_id){

2
pages/account/address.vue

@ -92,7 +92,7 @@
getList(){ getList(){
let data={_action:'getconsignees'} let data={_action:'getconsignees'}
defaultRequest2(data).then(res=>{ defaultRequest2(data).then(res=>{
// console.info(res) console.info(res)
if(res.error==0){ if(res.error==0){
this.list=res.data this.list=res.data
} }

387
pages/account/demo1.vue

@ -9,4 +9,391 @@
</script> </script>
<style> <style>
</style><template>
<view>
<uni-nav-bar :statusBar="true" left-icon="left" title="Review" color="#000000" :fixed="true" @clickLeft="back">
<block slot="right">
<view class="nav_right">
<button @click="reviewSub">Submit</button>
</view>
</block>
</uni-nav-bar>
<view class="body" >
<view class="order_popup_commodity">
<view class="good_info" >
<view class="good_info_left ">
<view class="good_info_image">
<image ></image>
</view>
<view class="left_info">
<view class="info_name">9</view>
<view class="left_info_bottom">
<view class="info_lable">
<text>{{}}</text>
<!-- <image src="/static/img/bottom.png" mode=""></image> -->
</view>
</view>
</view>
</view>
</view>
</view>
<view class="review">
<view class="review_title">
<text>Score</text>
<uni-rate size="22" disabledColor="#B22234" v-model="query.comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-if="reviewType==0"/>
<uni-rate size="22" disabledColor="#B22234" v-model="query1.comments[index].comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-else/>
</view>
<view class="review_content">
<image src="../../static/img/write.png" mode=""></image>
<textarea placeholder="Write reviews" v-if="reviewType==0" v-model="query.comment"></textarea>
<textarea placeholder="Write reviews" v-else v-model="query1.comments[index].comment"></textarea>
</view>
<view class="reason_upload">
<view class="reason_upload_item" @click="UploadVideo">
<image src="/static/img/vedio.png" class="upload_item_camera1" mode=""v-if="!VideoSrc"></image>
<image :src="VideoSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload the video</view>
</view>
<view class="reason_upload_item" @click="upload()">
<!-- <image src="/static/img/camera.png" class="upload_item_camera" mode="" v-if="!imgSrc"></image>
<image :src="imgSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload pictures</view> -->
<text ref="input" class="upFile" @click="upload()"></text>
</view>
<view class="reason_upload_item reason_upload_item1">
<!-- <image :src="" class="upload_item_image" mode=""></image> -->
</view>
</view>
<view class="reason_upload_tips">Upload JPG, PNG format, within 3M</view>
</view>
</view>
</view>
</template>
<script module="test" lang="renderjs" >
export default {
mounted() {
// ...
},
methods: {
upload(){
console.log(1111)
var input = document.createElement('input');
input.type = 'file';
input.accept='image/*';
this.$refs.input.$el.appendChild(input);
input.onchange = (event) => {
this.fileName = event.path[0].files[0].name;
}
$('input').click();
},
}
}
</script>
<script >
import {defaultRequest,defaultRequest2,defaultRequest3} from '../../api/index.js'
import { encryptDes, decryptDes ,encrypt_by_des } from '@/utils/des.js'
import Base64 from 'base-64';
import cryptoJS from "crypto-js"
import { pathToBase64 } from '@/js_sdk/mmmm-image-tools/index.js'
export default {
data() {
return {
orderDate:{},
// 0 1
reviewType:0,
query:{
_action:'commentordergoods',
order_id:'',
order_sn:'',
rec_id:'',
goods_id:'',
comment:'',
comment_rank:'',
commentlabels:''
},
query1:{
_action:'commentorder',
order_id:'',
order_sn:'',
comments:[]
},
VideoSrc:'',
imgSrc:''
}
},
methods:{
//
reviewSub(){
let data
if(this.reviewType==0){
this.commentordergoods()
}else{
// data=this.query1
this.commentordergoods1()
}
console.info(data)
},
//
commentordergoods(){
defaultRequest2(this.query).then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:'Comment successful!'
})
setTimeout(function(){
uni.navigateBack()
},2000)
}
})
},
//
commentordergoods1(){
defaultRequest2(this.query1,'comments').then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:'Comment successful!'
})
setTimeout(function(){
uni.navigateBack()
},2000)
}
})
},
back(){
uni.navigateBack()
},
//
UploadVideo(){
var that = this
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: function (res) {
console.log(res)
that.VideoSrc = res.tempFilePath;
}
})
},
//
Upimg(){
let url
uni.chooseImage({
count: 3, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function (res) {
console.info(res)
console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFiles[0]
console.log(res)
let data ={
_action:'uploadcommentfile',
atype: 1,
afile:res.tempFiles
}
console.log(data)
defaultRequest(data).then(res =>{
console.log(res)
})
console.log(data)
defaultRequest(data).then(res =>{
console.log(res)
})
// uni.uploadFile({
// url:'https://v2.alapi.cn/api/image',
// filePath: res.tempFilePaths[0],
// name:'file',
// success: (uploadFileRes) => {
// var that = this
// // uploadFileRes.data = decryptDes(uploadFileRes.data,"6780f04cf2e211ec86a8005056c00008")
// console.log(uploadFileRes)
// }
// })
uni.getImageInfo({
src: res.tempFilePaths[0],
success: (path) => {
pathToBase64(path.path).then(base64 => {
console.log(base64); // base64
url = base64
})
.catch(error => {
console.error(error)
})
}
})
// uni.request({
// url:'https://v2.alapi.cn/api/image',
// method:'POST',
// data:{
// image:url
// },
// success(res) {
// console.log(res)
// }
// })
}
});
}
},
onLoad(e) {
let datas=JSON.parse(e.data)
this.orderDate=datas
if(datas.order_goods.length>1){
this.reviewType=1
this.query1.order_id=datas.order_id
this.query1.order_sn=datas.order_sn
datas.order_goods.map(item=>{
let data={
rec_id:item.rec_id,
goods_id:item.goods_id,
comment:'',
comment_rank:'',
commentlabels:item.goods_attr.replace(/\s\n/g,' ')
}
this.query1.comments.push(data)
})
}else{
this.query.order_id=datas.order_id
this.query.order_sn=datas.order_sn
this.query.rec_id=datas.order_goods[0].rec_id
this.query.goods_id=datas.order_goods[0].goods_id
this.commentlabels=datas.order_goods[0].goods_attr.replace(/\s\n/g,' ')
}
},
filters:{
goodsAttr(e){
return e.replace(/\s\n/g,';');
}
}
}
</script>
<style lang="scss" scoped>
.review{
padding: 0 26rpx;
padding-top: 35.33rpx;
.review_title{
display: flex;
align-items: center;
font-weight: bold;
font-size: 32rpx;
margin-bottom: 44rpx;
.rate{
margin-left: 24.67rpx;
}
}
.review_content{
display: flex;
image{
width: 29.33rpx;
height: 29.33rpx;
}
textarea{
font-size: 28rpx;
font-weight: 400;
width: 100%;
height: 113.33rpx;
margin-left: 4rpx;
}
}
.reason_upload{
display: flex;
flex-wrap: wrap;
margin-bottom: 34.67rpx;
.reason_upload_item{
border: 1px dashed #D2D2D2;
border-radius: 15rpx;
width: 156rpx;
height: 156rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 12rpx;
color: #BFBCBC;
margin-right: 23.33rpx;
&:nth-child(3n+3){
margin-right: 0;
}
.upload_item_camera{
width: 72rpx;
height: 54.67rpx;
margin-bottom: 14rpx;
}
.upload_item_camera1{
width: 72rpx;
height: 72rpx;
// margin-bottom: 14rpx;
}
.upload_item_image{
width: 100%;
height: 100%;
border-radius: 15rpx;
}
}
.reason_upload_item1{
position: relative;
&::after{
content: "";
width: 30.67rpx;
height: 30.67rpx;
position: absolute;
right: -12rpx;
top: -12rpx;
z-index: 99;
background-image: url("@/static/img/close3.png");
background-size: 100% 100%;
}
}
}
.reason_upload_tips{
font-size: 20rpx;
color: #666666;
}
}
.uni-navbar{
font-size: 32rpx;
font-weight: bold;
}
.nav_right{
button{
width: 116.67rpx;
height: 48rpx;
background-color: black;
margin: 0;
line-height: 48rpx;
border-radius: 24rpx;
font-size: 24rpx;
font-weight: bold;
color: white;
padding-left: 0;
padding-right: 0;
}
}
.body{
border-top: 14.67rpx #F6F5FA solid;
}
.order_popup_commodity{
padding: 0 33.33rpx;
border-bottom: 14.67rpx #F6F5FA solid;
}
</style> </style>

7
pages/account/favorites.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="wishlist_body"> <view class="wishlist_body">
<view class="status_bar"></view> <view class="status_bar"></view>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Favorites" color="#000000" @clickLeft="back" @clickRight="$refs.alertDialog.open()"/> <uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Favorites" color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="$refs.alertDialog.open()"/>
<view class="wishlist"> <view class="wishlist">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="index" @click="goDetails(item)"> <view class="wishlist_item" v-for="(item,index) in goodsList" :key="index" @click="goDetails(item)">
<view class="wishlist_item_img"> <view class="wishlist_item_img">
@ -123,6 +123,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page{
}
.status_bar{
height: 50rpx;
width: 100%;
background-color: #000000;
} }
.uni-navbar{ .uni-navbar{
font-size: 32rpx; font-size: 32rpx;

18
pages/account/index.vue

@ -217,16 +217,16 @@
defaultRequest(data).then(res=>{ defaultRequest(data).then(res=>{
console.info(res,) console.info(res,)
if(res.error==0&&this.isLogin == 1){
this.hb_num=res.data.length
}
}) })
defaultRequest({ defaultRequest({
_action:'getusersummarydata' _action:'getusersummarydata'
}).then(res =>{ }).then(res =>{
console.log(res)
if(res.error ==0){ if(res.error ==0){
this.count = res.data.user_info.rank_points this.count = res.data.user_info.rank_points
this.hb_num = res.data.user_bonus_list.length
console.log(this.hb_num)
} }
}) })
}, },
@ -255,7 +255,7 @@
// //
getCatList(type){ getCatList(type){
defaultRequest4(this.catQuery).then(res=>{ defaultRequest4(this.catQuery).then(res=>{
console.info(res) // console.info(res)
if(res.error==0){ if(res.error==0){
if(res.data){ if(res.data){
this.catList=res.data this.catList=res.data
@ -286,7 +286,6 @@
res.data.isLogin=true res.data.isLogin=true
// this.user_info=res.data // this.user_info=res.data
this.noLogin = 0 this.noLogin = 0
this.hb_num = 0
uni.setStorageSync('user_info',res.data) uni.setStorageSync('user_info',res.data)
this.user_info=uni.getStorageSync('user_info') this.user_info=uni.getStorageSync('user_info')
console.log(this.user_info) console.log(this.user_info)
@ -331,6 +330,7 @@
uni.startPullDownRefresh() uni.startPullDownRefresh()
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList()
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin) console.log(this.isLogin)
if(this.isLogin==0){ if(this.isLogin==0){
@ -349,7 +349,7 @@
.account_info{ .account_info{
padding: 0 50rpx; padding: 0 50rpx;
padding-top: 66rpx; padding-top: 97rpx;
padding-bottom: 40rpx; padding-bottom: 40rpx;
border-bottom: 13.33rpx #F7F7F7 solid; border-bottom: 13.33rpx #F7F7F7 solid;
display: flex; display: flex;
@ -363,8 +363,8 @@
width: 144rpx; width: 144rpx;
height: 144rpx; height: 144rpx;
border-radius: 50%; border-radius: 50%;
margin-bottom: 36.67rpx; margin-bottom: 9.67rpx;
background-color: #F7F7F7; background-color: #000000;
} }
.info_name{ .info_name{
font-size: 36rpx; font-size: 36rpx;

6
pages/account/message.vue

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<uni-nav-bar left-icon="left" :statusBar="true" title="Message" <uni-nav-bar left-icon="left" :statusBar="true" title="Message"
color="#000000" @clickLeft="back" :border="false"/> color="#fff" backgroundColor="#000000" @clickLeft="back" :border="false"/>
<view class="body"> <view class="body">
<view class="msg_item" v-for="(item,index) in list.blocks" :key="item.block_title" @click="gotopage(item)"> <view class="msg_item" v-for="(item,index) in list.blocks" :key="item.block_title" @click="gotopage(item)">
@ -133,13 +133,13 @@
font-weight: bold; font-weight: bold;
} }
.body{ .body{
border-top: 13.33rpx #F7F7F7 solid; // border-top: 13.33rpx #F7F7F7 solid;
padding:0 26.67rpx; padding:0 26.67rpx;
} }
.msg_item{ .msg_item{
padding-top: 42.67rpx; padding-top: 42.67rpx;
padding-bottom: 28rpx; padding-bottom: 28rpx;
border-bottom: 1px solid #E2E2E2; // border-bottom: 1px solid #E2E2E2;
.msg_time{ .msg_time{
font-size: 25.33rpx; font-size: 25.33rpx;

22
pages/account/myCoupons.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<uni-nav-bar left-icon="left" :statusBar="true" title="My Coupons" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/> <uni-nav-bar left-icon="left" :statusBar="true" title="My Coupons" color="#fff" backgroundColor="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/>
<view class="body"> <view class="body">
<view class="coupons_item" v-for="(item,index) in list " :key="item.bonus_id"> <view class="coupons_item" v-for="(item,index) in list " :key="item.bonus_id">
<view class="coupons_item_left"> <view class="coupons_item_left">
@ -14,7 +14,7 @@
<text>The tide zone is available</text> <text>The tide zone is available</text>
<view class="coupons_right_info_time">{{item.use_start_date}} - {{item.use_end_date}}</view> <view class="coupons_right_info_time">{{item.use_start_date}} - {{item.use_end_date}}</view>
</view> </view>
<button>Use Now</button> <button @click="goPage(1)">Use Now</button>
</view> </view>
</view> </view>
</view> </view>
@ -42,10 +42,18 @@
back(){ back(){
uni.navigateBack() uni.navigateBack()
}, },
goPage(){ goPage(e){
uni.navigateTo({ if(e==1){
url:"/pages/index/pickUpCentre" uni.switchTab({
}) url:'../index/index'
})
}
else{
uni.navigateTo({
url:"/pages/index/pickUpCentre"
})
}
} }
}, },
onShow() { onShow() {
@ -60,7 +68,7 @@
font-weight: bold; font-weight: bold;
} }
.body{ .body{
border-top: 14.67rpx #F7F7F7 solid; // border-top: 14.67rpx #F7F7F7 solid;
padding:0 26rpx; padding:0 26rpx;
padding-top: 31.33rpx; padding-top: 31.33rpx;
} }

2
pages/account/myOrders.vue

@ -283,7 +283,7 @@
<view class="left_info"> <view class="left_info">
<view class="info_name">{{item1.goods_name}}</view> <view class="info_name">{{item1.goods_name}}</view>
<view class="left_info_bottom"> <view class="left_info_bottom">
<view class="info_lable"> <view class="info_lable" v-if="item1.goods_attr">
<text>{{item1.goods_attr |goodsAttr}}</text> <text>{{item1.goods_attr |goodsAttr}}</text>
<!-- <image src="/static/img/bottom.png" mode=""></image> --> <!-- <image src="/static/img/bottom.png" mode=""></image> -->
</view> </view>

26
pages/account/pointsDetails.vue

@ -1,13 +1,13 @@
<template> <template>
<view> <view>
<uni-nav-bar left-icon="left" right-icon="info"title="Points Details" color="#000000" @clickRight="goto()" @clickLeft="back" :border="false" :statusBar="true" /> <uni-nav-bar left-icon="left" right-icon="info"title="Points Details" color="#fff" backgroundColor="#000000" @clickRight="goto()" @clickLeft="back" :border="false" :statusBar="true" />
<view class="points"> <view class="points">
<view class="points_item" v-for="(item,index) in 10" :key="index"> <view class="points_item" v-for="(item,index) in list" :key="item.log_id">
<view class="points_item_title"> <view class="points_item_title">
<text>Order return</text> <text>{{ item.change_desc }}</text>
<text class="item_title_price">+US$314.00</text> <text class="item_title_price">+US${{ item.user_money }}</text>
</view> </view>
<text>21/04/2022 15:42:31</text> <text>{{ item.change_time }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -20,7 +20,8 @@
return { return {
query:{ query:{
_action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE' _action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE'
} },
list:[]
} }
}, },
methods:{ methods:{
@ -29,14 +30,17 @@
}, },
getUserinfo(){ getUserinfo(){
let data ={ let data ={
_action:'getuseraccountlog',page_index:'1',page_size:'20' _action:'getuseraccountlog',page_index:1,page_size:20
} }
defaultRequest(data).then( res =>{ defaultRequest(data).then( res =>{
console.log( res,'pppp') console.log( res)
if(res.error == 0){
this.list = res.data.accountlog_list
}
}) })
}, },
goto(){ goto(){
console.log('///////')
uni.navigateTo({ uni.navigateTo({
url:'../specialTitle/index?id='+'POINTSRULE' url:'../specialTitle/index?id='+'POINTSRULE'
}) })
@ -55,7 +59,7 @@
.uni-navbar{ .uni-navbar{
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
border-bottom: 14.67rpx #F6F5FA solid; // border-bottom: 14.67rpx #F6F5FA solid;
} }
.points{ .points{
padding: 0 25.33rpx; padding: 0 25.33rpx;
@ -65,7 +69,7 @@
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
border-bottom: 1px solid #E2E2E2; // border-bottom: 1px solid #E2E2E2;
.points_item_title{ .points_item_title{
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;

8
pages/account/wishlist.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="wishlist_body"> <view class="wishlist_body">
<view class="status_bar"></view> <view class="status_bar"></view>
<uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Wishlist" color="#000000" @clickLeft="back" @clickRight="clickRight()"/> <uni-nav-bar left-icon="left" :rightText="isDelete?'Done':'Delete'" title="Wishlist" color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="clickRight()"/>
<view class="wishlist"> <view class="wishlist">
<view class="wishlist_item" v-for="(item,index) in goodsList" :key="item.goods_id" > <view class="wishlist_item" v-for="(item,index) in goodsList" :key="item.goods_id" >
<view class="wishlist_item_img"@click="isDelete?selectGoods(item.goods_id,index): goDetails(item.goods_id)"> <view class="wishlist_item_img"@click="isDelete?selectGoods(item.goods_id,index): goDetails(item.goods_id)">
@ -277,6 +277,12 @@
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page{
}
.status_bar {
// height: var(--status-bar-height);
width: 100%;
height: 50rpx;
background-color: #000000;
} }
.uni-navbar{ .uni-navbar{
font-size: 32rpx; font-size: 32rpx;

4
pages/category/index.vue

@ -272,7 +272,7 @@
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 99; z-index: 99;
border-bottom: 1px solid #F5F6FA; // border-bottom: 1px solid #F5F6FA;
.search1{ .search1{
display: flex; display: flex;
@ -320,7 +320,7 @@
height: 100%; height: 100%;
display: flex; display: flex;
overflow: hidden; overflow: hidden;
margin-top: 185rpx; margin-top: 166rpx;
} }
.category_left{ .category_left{
height: 100%; height: 100%;

183
pages/category/productList.vue

@ -1,5 +1,5 @@
<template> <template>
<view> <view class="black_bg">
<uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000" :border="false" :fixed="true"> <uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000" :border="false" :fixed="true">
<block slot="left"> <block slot="left">
<view class="nav_left"> <view class="nav_left">
@ -18,23 +18,26 @@
</view> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
<view class="pets_nav"> <view class="pets_nav" :style="{display:isCart?'none':''}">
<text :class="query.order_type==0?'active_text':''" @click="selectNav(0)">Synthesis</text> <text :class="query.order_type==0?'active_text':''" @click="selectNav(0)">Synthesis</text>
<view class="pets_nav_item" @click="selectNav(1)"> <view class="pets_nav_item" @click="selectNav(1)">
<text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text> <text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text>
<image src="/static/img/bottom1.png" mode="" class="pets_nav_arrow"></image> <view class="pets_nav_item_right">
<image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow"></image>
<image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow"></image>
</view>
</view> </view>
<view class="pets_nav_item" @click="selectNav(2)"> <view class="pets_nav_item" @click="selectNav(2)">
<text :class="query.order_type==1 ?'active_text':query.order_type==2 ?'active_text':''">Price</text> <text :class="query.order_type==1 ?'active_text':query.order_type==2 ?'active_text':''">Price</text>
<view class="pets_nav_item_right"> <view class="pets_nav_item_right">
<image src="../../static/img/top.png" mode="" class="pets_nav_arrow"></image> <image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow"></image>
<image src="/static/img/bottom1.png" mode="" class="pets_nav_arrow"></image> <image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow"></image>
</view> </view>
</view> </view>
<view class="pets_nav_image"> <view class="pets_nav_image">
<image src="/static/img/pets_nav.png" mode="" v-show="pets_index==0" @click="pets_index=1,$refs.waterfallsFlowRef.refresh()"></image> <image src="/static/img/pets_nav_white.png" mode="" v-show="pets_index==0" @click="pets_index=1,$refs.waterfallsFlowRef.refresh()"></image>
<image src="/static/img/pets_nav1.png" mode="" v-show="pets_index==1" @click="pets_index=0"></image> <image src="/static/img/ptes_nav1_white.png" mode="" v-show="pets_index==1" @click="pets_index=0"></image>
</view> </view>
</view> </view>
<view class="body"> <view class="body">
@ -49,9 +52,9 @@
<view class="item_right_price"> <view class="item_right_price">
<text>US${{item.shop_price}}</text> <text>US${{item.shop_price}}</text>
<view class="right_price_operation"> <view class="right_price_operation">
<image src="../../static/img/like.png" mode="" v-show="item.is_attention==0" @click.stop="addLike(item.id)"></image> <image src="../../static/img/like_white.png" mode="" v-show="item.is_attention==0" @click.stop="addLike(item.id)"></image>
<image src="../../static/img/like1.png" mode="" v-show="item.is_attention==1" @click.stop="removeLike(item.id)"></image> <image src="../../static/icon/like_red.png" mode="" v-show="item.is_attention==1" @click.stop="removeLike(item.id)"></image>
<image src="../../static/img/cart2.png" mode=""@click.stop="gotoCart(item)"></image> <image src="../../static/icon/cat_white.png" mode=""@click.stop="gotoCart(item)"></image>
</view> </view>
</view> </view>
</view> </view>
@ -65,7 +68,7 @@
<view class="item_text">{{item.short_name}}</view> <view class="item_text">{{item.short_name}}</view>
<view class="desc"> <view class="desc">
<text>US${{item.shop_price}}</text> <text>US${{item.shop_price}}</text>
<image src="../../static/img/cart2.png" mode="" @click.stop="gotoCart(item)"></image> <image src="../../static/icon/cat_white.png" mode="" @click.stop="gotoCart(item)"></image>
</view> </view>
<view class="lable" v-if="item.tags!=''">{{item.tags}}</view> <view class="lable" v-if="item.tags!=''">{{item.tags}}</view>
</view> </view>
@ -76,7 +79,7 @@
<view class="addCard" v-show="isCart"> <view class="addCard" v-show="isCart">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false,goods_attr_list =[]"></image> <image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false,goods_attr_list =[]"></image>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false"> <scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false">
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image> <image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" @click="clickImg(index,gallery_list)"></image>
</scroll-view> </scroll-view>
<scroll-view class="addCard_body" scroll-y="true"> <scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view> <view >{{ goodsDate.goods_name}}</view>
@ -88,9 +91,9 @@
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" :class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''"> <view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image> <image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)"></image>
</view> </view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image> <image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''" ></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view>
</view> </view>
@ -99,12 +102,15 @@
</view> </view>
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view> </scroll-view>
<view class="quantity"> <!-- <view class="quantity">
<text>Quantity</text> <text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box> <uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view> </view> -->
<button @click="addCart">ADD TO CART</button> <button @click="addCart">ADD TO CART</button>
</view> </view>
@ -128,7 +134,8 @@
_action:'getgoods', _action:'getgoods',
order_type:0, order_type:0,
page_index:1, page_index:1,
page_size:10 page_size:20,
brand:''
}, },
cartBtn:false, cartBtn:false,
list:[], list:[],
@ -159,6 +166,7 @@
isLogin:-1, isLogin:-1,
current:0, current:0,
shop_price:0, shop_price:0,
tag:0,
} }
}, },
methods:{ methods:{
@ -368,6 +376,28 @@
}, },
back(){ back(){
uni.navigateBack() uni.navigateBack()
},
//
clickImg(index,list) {
let lists =[]
list.map( item =>{
if(item.img_url){
lists.push(item.img_url)
}
if(item.attr_img){
lists.push(item.attr_img)
}
})
wx.previewImage({
urls: lists, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}, },
goDetails(item,e){ goDetails(item,e){
console.info(item) console.info(item)
@ -398,7 +428,7 @@
}, },
getList(type){ getList(type){
console.log(this.query,'指令') console.log(this.query)
defaultRequest(this.query).then(res=>{ defaultRequest(this.query).then(res=>{
console.info(res) console.info(res)
@ -406,17 +436,23 @@
if(res.data){ if(res.data){
if(type==0){ if(type==0){
this.list=res.data this.list=res.data
this.$refs.waterfallsFlowRef.refresh(); this.$refs.waterfallsFlowRef.refresh();
}else{ }else{
this.list=this.list.concat(res.data) this.list=this.list.concat(res.data)
console.log(1112)
} }
}else{ }else{
uni.hideLoading();
console.log(1111)
this.isReachBottom=false this.isReachBottom=false
uni.showToast({ setTimeout(() => {
title: 'No more data yet', uni.showToast({
icon:'none' title: 'No more data yet',
}) icon:'none',
duration: 3000
})
},1000)
this.query.page_index-- this.query.page_index--
} }
} }
@ -426,19 +462,28 @@
}, },
onLoad(e) { onLoad(e) {
console.log(e) console.log(e)
if(e.gid){ if(e.gid){
this.query.gid = e.gid this.query.gid = e.gid
} }
if(e.tag == 1){
// this.isReachBottom = false
this.tag =e.tag
}
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
const a = parseInt(e.typethree) const a = parseInt(e.typethree)
this.Pet = e.title this.Pet = e.title
if(e.type ==0||e.goodslist ==1){ if(e.type ==0||e.goodslist ==1){
this.query.cat= a this.query.cat= a
} }
else{
if(e.keyword){
this.query.keyword=e.keyword this.query.keyword=e.keyword
this.Pet = e.keyword this.Pet = e.keyword
} }
if(e.brandid){
this.query.brand = e.brandid
}
this.getCartNum() this.getCartNum()
this.getList(0) this.getList(0)
@ -453,8 +498,12 @@
onReachBottom(){ onReachBottom(){
if(!this.isReachBottom)return if(!this.isReachBottom)return
this.query.page_index++
this.getList(1) // if(this.tag == 0){
this.query.page_index++
this.getList(1)
// }
}, },
onPullDownRefresh(){ onPullDownRefresh(){
@ -468,6 +517,12 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.black_bg{
height: 100vh;
width: 100%;
background-color: #000000;
}
.nav_left{ .nav_left{
image{ image{
width: 36rpx; width: 36rpx;
@ -490,12 +545,16 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: 26.67rpx; font-size: 26.67rpx;
color: #666666; // color: #666666;
font-weight: 600; font-weight: 600;
// border-top: 1px solid #F5F6FA; // border-top: 1px solid #F5F6FA;
border-bottom: 1px solid #F5F6FA; // border-bottom: 1px solid #F5F6FA;
position: fixed; position: fixed;
background-color: white; // background-color: white;
background-color: #000000;
color: #fff;
background: rgba(0, 0, 0,0.6);
// opacity: 0.6;
top: 0; top: 0;
margin-top: 135rpx; margin-top: 135rpx;
/* #ifdef H5 */ /* #ifdef H5 */
@ -503,9 +562,9 @@
/* #endif */ /* #endif */
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
z-index: 99; z-index: 90;
.active_text{ .active_text{
color: #000000; color: #fff;
} }
.pets_nav_item{ .pets_nav_item{
display: flex; display: flex;
@ -547,26 +606,29 @@
} }
.body{ .body{
padding: 0 26.67rpx; padding: 0 26.67rpx;
padding-top: 90rpx; padding-top: 60rpx;
background-color: rgb(0, 0, 0);
} }
.product1{ .product1{
padding-top: 26.67rpx; padding-top: 26.67rpx;
background-color: #000000;
/deep/.column-value{ /deep/.column-value{
border-radius: 0 !important; border-radius: 0 !important;
margin-bottom: 40rpx !important; margin-bottom: 20rpx !important;
} }
.product1_item{ .product1_item{
font-size: 29.33rpx; font-size: 22.33rpx;
font-weight: 400; font-weight: 400;
padding-top: 32rpx; padding-top: 20rpx;
color: #000000; background-color: #000000;
color: #fff;
.desc{ .desc{
margin-top: 28.67rpx; margin-top: 12.67rpx;
display: flex; display: flex;
font-size: 32rpx; font-size: 27rpx;
color: #191919; color: #fff;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-weight: 500; font-weight: 500;
@ -578,7 +640,7 @@
} }
.lable{ .lable{
padding: 11.33rpx 18rpx; padding: 11.33rpx 18rpx;
background-color: #FCF6F7; // background-color: #FCF6F7;
border-radius: 8rpx; border-radius: 8rpx;
color: #B22234; color: #B22234;
font-size: 20rpx; font-size: 20rpx;
@ -593,9 +655,9 @@
.product_item{ .product_item{
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 26.67rpx; font-size: 24.67rpx;
font-weight: 400; font-weight: 400;
margin-bottom: 34.67rpx; margin-bottom: 24.67rpx;
.product_item_image{ .product_item_image{
width: 213.33rpx; width: 213.33rpx;
height: 213.33rpx; height: 213.33rpx;
@ -604,8 +666,9 @@
} }
.product_item_right{ .product_item_right{
width: 440rpx; width: 440rpx;
height: 213.33rpx; // height: 213.33rpx;
display: flex; display: flex;
color:white;
// background-color: #B22234; // background-color: #B22234;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
@ -628,7 +691,7 @@
} }
.item_right_price{ .item_right_price{
display: flex; display: flex;
color: #191919; color: #fff;
font-size: 32rpx; font-size: 32rpx;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -691,7 +754,7 @@
} }
.addCard_body{ .addCard_body{
padding-right: 31.33rpx; padding-right: 31.33rpx;
max-height: 600rpx; max-height: 60vh;
min-height: 400rpx; min-height: 400rpx;
.addCard_price{ .addCard_price{
font-size: 44rpx; font-size: 44rpx;
@ -699,8 +762,7 @@
margin-top: 27.33rpx; margin-top: 27.33rpx;
margin-bottom: 51.33rpx; margin-bottom: 51.33rpx;
} }
.color_select{ .color_select{
display: flex; display: flex;
font-size: 16.67rpx; font-size: 16.67rpx;
color: #666666; color: #666666;
@ -892,18 +954,24 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.select_size_item{ .select_size_item{
background-color: #F8F8F8; background-color: red;
min-width: 121.33rpx; width: 97.67rpx;
height: 54.67rpx; height: 97.67rpx;
background-size: 100% 100% center center;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 12.67rpx; image{
color: #666666; height: 100%;
width: 100%;
}
// border-radius: 12.67rpx;
// color: #666666;
color:white;
font-size: 24rpx; font-size: 24rpx;
margin-right: 18.67rpx; margin-right: 18.67rpx;
border: 1px solid #F8F8F8; // border: 1px solid #F8F8F8;
padding: 0 10rpx; // padding: 0 10rpx;
margin-bottom: 16.67rpx; margin-bottom: 16.67rpx;
// &:nth-child(-n+2){ // &:nth-child(-n+2){
@ -913,6 +981,7 @@
} }
.item_text{ .item_text{
height: 80rpx; height: 80rpx;
font-size: 26rpx;
line-height: 40rpx; line-height: 40rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -925,7 +994,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: black; background-color: black;
opacity: 0.5;
z-index: 998; z-index: 998;
top: 0; top: 0;
left: 0; left: 0;

192
pages/index/first.vue

@ -0,0 +1,192 @@
<template>
<view class="body">
<!-- 启动页广告 -->
<view class="open_bg">
<view class="open_text"><text @click="gotopage(1)">{{ countdownTime2 }}s skip</text></view>
<swiper class ="open_bgimg" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item,index) in open_img" :key="item.block_pic">
<image :src="item.block_pic" mode="" @click="imgTopage(item.block_link)" style="width: 100%;height: 100%;"></image>
</swiper-item>
</swiper>
<!-- <image :src="open_img" style="width: 100%;height: 100%;z-index: -1;" @click="imgTo(open_img)"></image> -->
</view>
</view>
</template>
<script>
import {defaultRequest,defaultRequest4} from '../../api/index.js'
export default {
data(){
return {
open_img:[],
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500,
countdownTime2:5,
heightOne:0,
heightTwo:0,
}
},
onLoad() {
this.getMes()
// this.getCountdownTime()
// #ifdef APP-PLUS
plus.navigator.setFullscreen(true);
// #endif
},
// created(){
// this.getCountdownTime()
// },
methods:{
getMes(){
let data={_action:'getpagedata',pagecode:'001-STARTPAGE'}
// setTimeout( () =>{
defaultRequest(data).then( res =>{
console.log('1',res)
let img
let url
if(res.error == 0){
res.data.zones.map( item =>{
if(item.zone_code == "KAIPIN"){
img = item.blocks
url = item.blocks[0].block_link
this.open_img = img
if(this.open_img.length > 0){
setTimeout( () =>{
this.getCountdownTime()
},500)
}
}
})
console.log(this.open_img)
this.popUrl = url
}
})
// },5000)
},
//5
getCountdownTime() {
uni.hideTabBar();
uni.setTabBarStyle({
backgroundColor: "#ccc",
borderStyle: "black",
// selectedColor: "#999",
// color: "#999",
});
let timer2 = setInterval(() => {
// uni.hideTabBar();
this.countdownTime2--;
if (this.countdownTime2 < 1) {
clearInterval(timer2)
this.countdownTime2 = 0
}
if(this.countdownTime2 ==0){
uni.switchTab({
url:'./index'
})
uni.showTabBar()
}
}, 1000)
},
gotopage(e){
if(e==1){
uni.switchTab({
url:'./index'
})
}
},
imgTopage(item){
console.log(111)
console.log(item,'item')
const i = item.indexOf('?')
const str = item.substring(i)
if(item.includes('goodid')){
uni.navigateTo({
url:'../productDetails/index'+str+'&img=1'
})
}
else if(item.includes('goodslist')){
uni.navigateTo({
url:'../category/productList'+ str
})
}
},
}
}
</script>
<style lang="scss" scoped>
.body{
background-color: #000;
}
.open_bg{
height: 100vh;
width: 100%;
top:0;
color: white;
z-index: -1;
bottom: var(--window-bottom,0);
background-size:100% 100%;
background: center center no-repeat;
// image{
// height: 100%;
// width: 100%;
// }
.open_text{
right:0;
top:50rpx;
height: 50rpx;
width: 120rpx;
font-size: 28rpx;
margin-right: 10rpx;
margin-top: 10rpx;
background-color:#ececec;
background-color:rgba(0,0,0,0.5);
line-height: 50rpx;
opacity: 0.5;
text-align: center;
position: absolute;
z-index:99;
border-radius: 5rpx;
}
.open_bgimg{
margin: 0;
padding: 0;
top:0;
height: 100%;
width: 100%;
position: relative;
color:white;
image{
height: 100%;
width: 100%;
}
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
}
}
</style>

79
pages/index/flashSale.vue

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<uni-nav-bar left-icon="left" :statusBar="true" title="Flash Sale" <uni-nav-bar left-icon="left" :statusBar="true" title="Flash Sale"
color="#000000" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/> color="#fff" backgroundColor="#000000" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<view class="body"> <view class="body">
<view class="countDown"> <view class="countDown">
@ -10,7 +10,7 @@
color="#FFFFFF" background-color="#1B1B1B" class="countDown_assembly" /> color="#FFFFFF" background-color="#1B1B1B" class="countDown_assembly" />
</view> </view>
<view class="tips"> <view class="tips">
Chic selects commodities from time to time to carry DopePlus selects commodities from time to time to carry
out special price activities. out special price activities.
</view> </view>
<view class="tips1">The quantity of special price commodities is limited and will be sold out</view> <view class="tips1">The quantity of special price commodities is limited and will be sold out</view>
@ -36,7 +36,7 @@
<view class="addCard" v-show="isCart"> <view class="addCard" v-show="isCart">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false"></image> <image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false"></image>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false" > <scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false" >
<image mode="" class="addCard_scroll" :src="item.img_url" v-for="(item,index) in gallery_list" :key="index" ></image> <image mode="" class="addCard_scroll" :src="item.img_url" @click="clickImg(index,gallery_list)" v-for="(item,index) in gallery_list" :key="index" ></image>
</scroll-view> </scroll-view>
<scroll-view class="addCard_body" scroll-y="true"> <scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view> <view >{{ goodsDate.goods_name}}</view>
@ -55,7 +55,7 @@
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" :class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''"> <view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image> <image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)"></image>
</view> </view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image> <image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
@ -64,11 +64,15 @@
</view> </view>
</view> </view>
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view> </scroll-view>
<view class="quantity"> <!-- <view class="quantity">
<text>Quantity</text> <text>Quantity</text>
<uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box> <uni-number-box background="#fff" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view> </view> -->
<button @click="addCart">ADD TO CART</button> <button @click="addCart">ADD TO CART</button>
</view> </view>
</view> </view>
@ -300,8 +304,39 @@
} }
}, },
//
clickImg(index,list) {
let lists =[]
list.map( item =>{
if(item.img_url){
lists.push(item.img_url)
}
if(item.attr_img){
lists.push(item.attr_img)
}
})
wx.previewImage({
urls: lists, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
},
onPageScroll(e) {
// console.log( e.scrollTop)
// if(e.scrollTop>8){
// plus.navigator.setStatusBarStyle("light");
// }else{
// plus.navigator.setStatusBarStyle("dark");
// }
}, },
onLoad() { onLoad() {
this.getList() this.getList()
@ -320,6 +355,7 @@
border-top: 13.33rpx #F7F7F7 solid; border-top: 13.33rpx #F7F7F7 solid;
padding:0 26rpx; padding:0 26rpx;
padding-top: 34rpx; padding-top: 34rpx;
height: 100vh;
} }
.recommend{ .recommend{
padding: 0; padding: 0;
@ -420,11 +456,11 @@
.addCard_body{ .addCard_body{
padding-right: 31.33rpx; padding-right: 31.33rpx;
min-height: 400rpx; min-height: 400rpx;
max-height: 600rpx; max-height: 60vh;
.addCard_price{ .addCard_price{
font-size: 44rpx; font-size: 44rpx;
font-weight: 500; font-weight: 500;
margin-top: 27.33rpx; margin-top: 24.33rpx;
margin-bottom: 51.33rpx; margin-bottom: 51.33rpx;
} }
.color_select{ .color_select{
@ -497,13 +533,13 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 43.33rpx; margin-bottom: 43.33rpx;
margin-left: 10rpx; // margin-left: 10rpx;
.uni-numbox{ .uni-numbox{
border: 1px solid #999999; border: 1px solid #999999;
border-radius: 14rpx; border-radius: 14rpx;
height: 42.67rpx; height: 42.67rpx;
margin-right: 17rpx; margin-right: 33rpx;
/deep/ .uni-numbox__minus{ /deep/ .uni-numbox__minus{
border-radius: 14rpx; border-radius: 14rpx;
} }
@ -520,8 +556,9 @@
} }
} }
button{ button{
width: 98%; width: 95%;
margin: 0 1%; margin-left: 2rpx;
// margin-right: 18rpx;
height: 73.33rpx; height: 73.33rpx;
line-height: 73.33rpx; line-height: 73.33rpx;
background-color: #191919; background-color: #191919;
@ -621,17 +658,25 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.select_size_item{ .select_size_item{
background-color: #F8F8F8; height: 97rpx;
min-width: 121.33rpx; width: 97rpx;
height: 54.67rpx; background-size: 100% 100%;
background-size:cover;
image{
height: 100%;
width: 100%;
}
// background-color: #F8F8F8;
// min-width: 121.33rpx;
// height: 54.67rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 12.67rpx; border-radius: 12.67rpx;
color: #666666; // color: #666666;
font-size: 24rpx; font-size: 24rpx;
margin-right: 18.67rpx; margin-right: 18.67rpx;
border: 1px solid #F8F8F8; // border: 1px solid #F8F8F8;
padding: 0 10rpx; padding: 0 10rpx;
margin-bottom: 16.67rpx; margin-bottom: 16.67rpx;

543
pages/index/index.vue

File diff suppressed because it is too large

14
pages/index/index2.vue

@ -3,11 +3,11 @@
<view class="body" > <view class="body" >
<!-- 头部导航栏 --> <!-- 头部导航栏 -->
<uni-nav-bar :statusBar="true" :title="Pet" color="#000000" :border="false" :fixed="true"> <uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000000" :border="false" :fixed="true">
<block slot="left"> <block slot="left">
<view class="nav_left"> <view class="nav_left">
<image src="../../static/img/left.png" mode="" @click="back()"></image> <image src="../../static/img/left_white.png" mode="" @click="back()"></image>
<image src="../../static/img/seach1.png" mode="" @click="goPage()"></image> <image src="../../static/img/seach.png" mode="" @click="goPage()"></image>
</view> </view>
</block> </block>
@ -15,7 +15,7 @@
<view class="nav_right"> <view class="nav_right">
<navigator url="/pages/shippingCart/index" open-type="switchTab"> <navigator url="/pages/shippingCart/index" open-type="switchTab">
<uni-badge :text="sum" type="error" absolute="rightTop"> <uni-badge :text="sum" type="error" absolute="rightTop">
<image src="../../static/img/shop_cart.png" mode=""></image> <image src="../../static/img/shop_cart1.png" mode=""></image>
</uni-badge> </uni-badge>
</navigator> </navigator>
</view> </view>
@ -730,7 +730,7 @@
// } // }
.navigation{ .navigation{
/* display: flex; */ /* display: flex; */
background-color:#161616; background-color:#000000;
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 99; z-index: 99;
@ -739,6 +739,7 @@
width: 100%; width: 100%;
.navigation_title{ .navigation_title{
display: flex; display: flex;
background-color: #000000;
padding: 30rpx 0; padding: 30rpx 0;
align-items: center; align-items: center;
@ -845,6 +846,9 @@
.uni-bg-blue{ .uni-bg-blue{
background-color: blue; background-color: blue;
} }
.uni-bg-black{
background-color: #000000;
}
} }
} }
.grid_swiper { .grid_swiper {

51
pages/index/pickUpCentre.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<uni-nav-bar left-icon="left" :statusBar="true" title="CouPons" color="#000000" @clickLeft="back" :border="false"> <uni-nav-bar left-icon="left" :statusBar="true" title="CouPons" color="#fff" backgroundColor="#000000" @clickLeft="back" :border="false">
<!-- <block slot="right"> <!-- <block slot="right">
<view class="head_coupons"> <view class="head_coupons">
<image src="../../static/img/coupons.png" mode=""></image> <image src="../../static/img/coupons.png" mode=""></image>
@ -23,6 +23,7 @@
<view class="coupons_right_info_time">{{item.send_start_date}} - {{item.send_end_date}}</view> <view class="coupons_right_info_time">{{item.send_start_date}} - {{item.send_end_date}}</view>
</view> </view>
<button v-if="item.is_obtained==0" @click="obtainbonus(item.type_id)">Receive</button> <button v-if="item.is_obtained==0" @click="obtainbonus(item.type_id)">Receive</button>
<button v-if="item.is_obtained!=0" @click="gotopage()">Use Now</button>
<image src="../../static/img/coupons_bg.png" mode="" class="coupons_item_right_bg" v-if="item.is_obtained==1"></image> <image src="../../static/img/coupons_bg.png" mode="" class="coupons_item_right_bg" v-if="item.is_obtained==1"></image>
</view> </view>
</view> </view>
@ -40,17 +41,28 @@
}, },
methods:{ methods:{
obtainbonus(id){ obtainbonus(id){
let tag = 0
tag = uni.getStorageSync('isLogin')
console.log(tag)
let data={_action:'obtainbonus',type_id:id} let data={_action:'obtainbonus',type_id:id}
defaultRequest2(data).then(res=>{ if(tag == 1){
console.info(res) defaultRequest2(data).then(res=>{
if(res.error==0){ console.info(res)
uni.showToast({ if(res.error==0){
icon:'none', uni.showToast({
title:res.message icon:'none',
}) title:res.message
} })
this.getList() }
}) this.getList()
})
}
else{
uni.navigateTo({
url:'../login/index'
})
}
}, },
getList(){ getList(){
let data={_action:'getbonuslist'} let data={_action:'getbonuslist'}
@ -64,6 +76,23 @@
back(){ back(){
uni.navigateBack() uni.navigateBack()
}, },
gotopage(){
let tag = 0
console.log(1111)
tag = uni.getStorageSync('isLogin')
console.log(tag)
if(tag == 1){
uni.switchTab({
url:'./index'
})
}
else{
uni.navigateTo({
url:'../login/index'
})
}
}
}, },
onLoad() { onLoad() {
this.getList() this.getList()

5
pages/index/search.vue

@ -128,12 +128,17 @@
// defaultRequest(data).then(res=>{ // defaultRequest(data).then(res=>{
// console.log(res,'ke') // console.log(res,'ke')
// }) // })
console.log(this.catQuery)
uni.navigateTo({ uni.navigateTo({
url:'../category/productList?keyword='+this.searchValue+'&type=1' url:'../category/productList?keyword='+this.searchValue+'&type=1'
}) })
}, },
tapSearch(i){ tapSearch(i){
this.searchValue = i this.searchValue = i
console.log(this.catQuery)
uni.navigateTo({
url:'../category/productList?keyword='+this.searchValue+'&type=1'
})
}, },
// //
empty() { empty() {

19
pages/login/index.vue

@ -13,13 +13,13 @@
<view class="tips" v-show="loginErr">{{errMsg}}</view> <view class="tips" v-show="loginErr">{{errMsg}}</view>
<view class="forgot" @click="forgotPwd">Forgot your Password?</view> <view class="forgot" @click="forgotPwd">Forgot your Password?</view>
<button class="login_submit" :disabled="isLogin" @click="login()">SIGN IN</button> <button class="login_submit" :disabled="isLogin" @click="login()">SIGN IN</button>
<view class="agreement"> <!-- <view class="agreement">
<image src="../../static/img/select2.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect,loginErr=false" v-show="!loginSelect"></image> <image src="../../static/img/select2.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect,loginErr=false" v-show="!loginSelect"></image>
<image src="../../static/img/select1.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect" v-show="loginSelect"></image> <image src="../../static/img/select1.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect" v-show="loginSelect"></image>
<view class="agreement_right"> <view class="agreement_right">
by continuong, you agree to be <text class="text" @click="gotonewpage(1)"> terms of use </text> and <text class="text"@click="gotonewpage"> privacy policy</text>. by continuong, you agree to be <text class="text" @click="gotonewpage(1)"> terms of use </text> and <text class="text"@click="gotonewpage"> privacy policy</text>.
</view> </view>
</view> </view> -->
</view> </view>
<view class="login" v-show="current==1"> <view class="login" v-show="current==1">
@ -136,18 +136,19 @@
}, },
// //
configuration(){ configuration(){
let data={_action:'getpagedata',pagecode:'PAGE-LOGIN'} let data={_action:'getpagedata',pagecode:'006-PERSONALCENTERPAG'}
defaultRequest1(data).then(res=>{ defaultRequest1(data).then(res=>{
console.info(res) console.info(res)
}) })
}, },
// //
login(){ login(){
if(!this.loginSelect){ // if(!this.loginSelect){
this.errMsg='Please read and tick the terms of service and privacy policy first.' // this.errMsg='Please read and tick the terms of service and privacy policy first.'
this.loginErr=true // this.loginErr=true
return // return
} // }
console.log(this.loginDate) console.log(this.loginDate)
defaultRequest1(this.loginDate).then(res=>{ defaultRequest1(this.loginDate).then(res=>{
console.info(res) console.info(res)
@ -256,7 +257,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.login_body{ .login_body{
padding-top: 145.33rpx; padding-top: 305.33rpx;
} }
.see{ .see{
height: 30rpx; height: 30rpx;

5
pages/order/confirmation.vue

@ -309,8 +309,8 @@
postscript:'', postscript:'',
bonus:this.order.bonus, bonus:this.order.bonus,
surplus:this.order.surplus, surplus:this.order.surplus,
// shipping_id:this.orderId, // shipping_id:this.orderId,
shipping_id:this.order.shipping_id, shipping_id:this.order.shipping_id,
directshopping:0, directshopping:0,
} }
defaultRequest3(data,'consignee').then(res=>{ defaultRequest3(data,'consignee').then(res=>{
@ -401,6 +401,7 @@
this.query=JSON.parse(e.query) this.query=JSON.parse(e.query)
this.orderId = e.orderId this.orderId = e.orderId
this.order.shipping_id = e.orderId
if(this.orderId){ if(this.orderId){
this.tag =1 this.tag =1
} }

2
pages/order/details.vue

@ -96,7 +96,7 @@
</view> </view>
<view class="info_price"> <view class="info_price">
<text>US${{item.subtotal}}</text> <text>US${{item.subtotal}}</text>
<button v-if="details_index!=0 && details_index!=4">RREFUND</button> <!-- <button v-if="details_index!=0 && details_index!=4">RREFUND</button> -->
</view> </view>
</view> </view>
</view> </view>

24
pages/order/logisticsDetails.vue

@ -1,15 +1,16 @@
<template> <template>
<view> <view>
<view v-for="(item,index) in list.goods" :key="item.goods_img">
<view class="logistics_info"> <view class="logistics_info">
<view class="logistics_info_image"> <view class="logistics_info_image">
<image :src="list.logo" mode=""></image> <image :src="item.goods_img" mode=""></image>
</view> </view>
<view class="logistics_info_right"> <view class="logistics_info_right">
<view class="info_right_title">{{list.isreceived==1?'Signed for':'In Transit'}}</view> <view class="info_right_title">{{list.isreceived==1?'Signed for':'In Transit'}}</view>
<text>{{list.expname}}</text> <text>{{list.expname}}</text>
<view class="info_right_num"> <view class="info_right_num">
<text>Order number : {{list.mailno}}</text> <text>Tracking number : {{item.invoice_no}}</text>
<view class="copy">Copy</view> <view class="copy" @click ="Copy(item.invoice_no)">Copy</view>
</view> </view>
</view> </view>
</view> </view>
@ -19,6 +20,7 @@
<view class="logistics_step_time">{{item.time}}</view> <view class="logistics_step_time">{{item.time}}</view>
</view> </view>
</view> </view>
</view>
</view> </view>
</template> </template>
@ -42,8 +44,20 @@
console.info(res) console.info(res)
if(res.error==0){ if(res.error==0){
this.list=res.data[0] this.list=res.data[0]
console.info(this.list)
} }
}) })
},
Copy(no){
uni.setClipboardData({
data:no,//
success:()=>{//
uni.showToast({//
title:'succeeded',
icon:'none'
})
}
});
} }
}, },
onLoad(e) { onLoad(e) {
@ -66,6 +80,10 @@
width: 133.33rpx; width: 133.33rpx;
height: 133.33rpx; height: 133.33rpx;
background-color: #999999; background-color: #999999;
image{
height: 100%;
width: 100%;
}
} }
.logistics_info_right{ .logistics_info_right{

37
pages/productDetails/goodsReview.vue

@ -3,17 +3,25 @@
<template v-if="list.length!=0"> <template v-if="list.length!=0">
<view class="reviews_item" v-for="(item,index) in list" :key="index"> <view class="reviews_item" v-for="(item,index) in list" :key="index">
<view class="reviews_item_title"> <view class="reviews_item_title">
<view class="reviews_title_user"> <view class="reviews_item_img"><image mode="" :src="item.avatar_img_small"></image></view>
<text>{{item.user_name}}</text> <view class="reviews_item_one">
<uni-rate size="18" :disabled="true" disabledColor="red" :value="item.comment_rank" active-color="red" :is-fill="false"/> <view class="reviews_title_user">
<view class="reviews_title_user_name">{{item.user_name}}</view>
<uni-rate style="margin-left: 2rpx;margin-top: 10rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/>
</view>
<view class="reviews_title_color">Color:###</view>
</view> </view>
<view class="reviews_title_time">{{item.add_time}}</view>
<view class="reviews_title_time">{{item.add_time | date}}</view>
</view> </view>
<view class="reviews_item_color">{{item.commentlabels}}</view> <view class="reviews_item_color">{{item.commentlabels}}</view>
<view class="reviews_item_content">{{item.content}}</view> <view class="reviews_item_content">{{item.content}}</view>
<!-- <view class="reviews_item_image"> <view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 3" :key="index"></view> <view class="reviews_image_content" v-for="(item1,index1) in item.attachments" :key="item1.afile">
</view> --> <!-- <text> {{ item1.afile}}</text> -->
<image mode=" " :src="item1.afile"></image>
</view>
</view>
</view> </view>
</template> </template>
<view class="noreview" v-else>No comment for the time being</view> <view class="noreview" v-else>No comment for the time being</view>
@ -37,6 +45,18 @@
list:[] list:[]
} }
}, },
filters:{
date(e){
let str = e
str=str.substring(0,10);
const year = str.substring(0,4)
let date = str.substring(5,10)
date = date.replace('-','/')
let time = date + '/'+year
return time
}
},
methods:{ methods:{
getList(){ getList(){
defaultRequest(this.query).then(res=>{ defaultRequest(this.query).then(res=>{
@ -94,4 +114,7 @@
background-color: white; background-color: white;
opacity: 0; opacity: 0;
} }
.reviews_item{
border-bottom: #f0f0f0 1rpx solid;
}
</style> </style>

244
pages/productDetails/index.vue

@ -1,5 +1,5 @@
<template> <template>
<view> <view class="body">
<uni-nav-bar backgroundColor="#000000" :statusBar="true" left-icon="left" color="#fff" :leftWidth="navWidth" :rightWidth="navWidth" :fixed="true" @clickLeft="back"> <uni-nav-bar backgroundColor="#000000" :statusBar="true" left-icon="left" color="#fff" :leftWidth="navWidth" :rightWidth="navWidth" :fixed="true" @clickLeft="back">
<view class="input-view"> <view class="input-view">
<!-- <uni-icons class="input-uni-icon" type="search" size="18" color="#999" /> --> <!-- <uni-icons class="input-uni-icon" type="search" size="18" color="#999" /> -->
@ -33,7 +33,7 @@
<swiper-item :touchable="true" v-if="goodsDate.goods_video"> <swiper-item :touchable="true" v-if="goodsDate.goods_video">
<view class="swiper-item uni-bg-black" :style="{ background: 'url(' + goodsDate.gallery_list[0].img_url + ')' }"> <view class="swiper-item uni-bg-black" :style="{ background: 'url(' + goodsDate.gallery_list[0].img_url + ')' }">
<video v-if="video" :autoplay="true" :enable-progress-gesture="true" :mobilenet-hint-type="1" class="video_play" <video v-if="video" :autoplay="true" :enable-progress-gesture="true" :mobilenet-hint-type="1" class="video_play"
:http-cache="true" @pause="VideoPuse()" :http-cache="true" @pause="VideoPuse()" object-fit="contain" :direction="0"
:src=" goodsDate.goods_video" :show-mute-btn="true" :src=" goodsDate.goods_video" :show-mute-btn="true"
@touchstart="touchStart" @touchend="touchEnd" > @touchstart="touchStart" @touchend="touchEnd" >
</video> </video>
@ -86,9 +86,9 @@
<text>US${{goodsDate.is_promote==0? goodsDate.shop_price :goodsDate.promote_price}}</text> <text>US${{goodsDate.is_promote==0? goodsDate.shop_price :goodsDate.promote_price}}</text>
<view class="info_price_right"> <view class="info_price_right">
<image src="/static/img/like.png" mode="" v-show="goodsDate.is_attention==0" @click="addLike(goodsDate.id)"></image> <image src="/static/img/like_white.png" mode="" v-show="goodsDate.is_attention==0" @click="addLike(goodsDate.id)"></image>
<image src="../../static/img/like1.png" mode="" v-show="goodsDate.is_attention==1" @click="removeLike(goodsDate.id)"></image> <image src="../../static/icon/like_red.png" mode="" v-show="goodsDate.is_attention==1" @click="removeLike(goodsDate.id)"></image>
<image src="../../static/img/share.png" mode=""@click="Isshare=true"></image> <image src="../../static/icon/share_white.png" mode=""@click="Isshare=true"></image>
</view> </view>
</view> </view>
<view>{{goodsDate.goods_name}} </view> <view>{{goodsDate.goods_name}} </view>
@ -103,17 +103,21 @@
<text>{{colorNum}}color</text> <text>{{colorNum}}color</text>
</view> </view>
<view > <view >
<view v-for="(item,index) in goodsDate.attr_list" :key="index" class="variations_select"> <!-- <view v-for="(item,index) in goodsDate.attr_list" :key="index" class="variations_select"> -->
<!-- <view class="variations_select_varieties" > <!-- <view class="variations_select_varieties" >
<view class="select_varieties_image" v-for="(item,index) in 3" :key="index"></view> <view class="select_varieties_image" v-for="(item,index) in 3" :key="index"></view>
</view> --> </view> -->
<view class="variations_select_size"> <view class="variations_select_size">
<view class="select_size_item" v-for="(item1,index1) in item.goods_attrs" :key="index1">{{item1.attr_value}}</view> <view class="select_size_item" v-for="(item,index ) in goodsDate.gallery_list" :key="item.img_url"
:style="{background:`url(${item.img_url})`}" @click="clickImg(index)">
<!-- <image :src="item.img_url" mode="" @click="clickImg(index)"></image> -->
</view>
<!-- <view class="select_size_item">35</view> <!-- <view class="select_size_item">35</view>
<view class="select_size_item">M</view> <view class="select_size_item">M</view>
<view class="select_size_item">L</view> --> <view class="select_size_item">L</view> -->
</view> </view>
</view> <!-- </view> -->
</view> </view>
</view> </view>
@ -133,13 +137,13 @@
<view class="spike1_item" v-for="(item,index) in shipping_list" :key="item.shipping_name" > <view class="spike1_item" v-for="(item,index) in shipping_list" :key="item.shipping_name" >
<view class="spike1_item_title"> <view class="spike1_item_title">
<view > <view >
{{ item.shipping_name}}: <text class="text_black">US${{ item.free_money}}</text> {{ item.shipping_name}}: <text class="text_red">US${{ item.free_money}}</text>
</view> </view>
<view > <view >
free on orders <text class="text_red">US${{ item.shipping_fee}}</text> free on orders <text class="text_red">US${{ item.shipping_fee}}</text>
</view> </view>
<view >Estimated to be deliverd on </view> <view class="text_bold_200" >Estimated to be deliverd on </view>
<view >{{ item.shipping_desc }}</view> <view class="text_bold_200" >{{ item.shipping_desc }}</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -150,7 +154,7 @@
<text>Shipping security</text> <text>Shipping security</text>
</view> </view>
<view class="goods_title_right"> <view class="goods_title_right">
<image src="../../static/img/right.png" mode=""></image> <image src="../../static/icon/right_white.png" mode=""></image>
</view> </view>
</view> </view>
@ -158,7 +162,7 @@
<!-- <ul> <!-- <ul>
<li>{{item.block_title}} </li> <li>{{item.block_title}} </li>
</ul> --> </ul> -->
<view class="icon" v-for="(item,index) in listtext" :key="item.block_title"><text style="color:#4b4b4b;font-size: 28rpx;margin:0 9rpx 0 9rpx;"></text>{{item.block_title}}</view> <view class="icon" v-for="(item,index) in listtext" :key="item.block_title"><text style="color:#fff;font-size: 28rpx;margin:0 9rpx 0 9rpx;"></text>{{item.block_title}}</view>
</view> </view>
</view> </view>
<view class="description goods_title" @click="isAttr=true"> <view class="description goods_title" @click="isAttr=true">
@ -168,14 +172,14 @@
<view class="goods_title_right"> <view class="goods_title_right">
<!-- <view>#Iron #Pearls,Flowers #Fashionable</view> --> <!-- <view>#Iron #Pearls,Flowers #Fashionable</view> -->
<view>{{goodsDate.tags}}</view> <view>{{goodsDate.tags}}</view>
<image src="../../static/img/right.png" mode="" ></image> <image src="../../static/icon/right_white.png" mode="" ></image>
</view> </view>
</view> </view>
</view> </view>
<view class="order_popup" v-show="isAttr"> <view class="order_popup" v-show="isAttr">
<view class="order_popup_title"> <view class="order_popup_title">
<text>Details</text> <text>Description</text>
<image src="../../static/img/close1.png" mode="" @click="isAttr=false"></image> <image src="../../static/img/close1.png" mode="" @click="isAttr=false"></image>
</view> </view>
@ -183,19 +187,27 @@
<!-- <scroll-view scroll-y="true" class="descriptionDetails" > --> <!-- <scroll-view scroll-y="true" class="descriptionDetails" > -->
<scroll-view scroll-y="true" class="text1"> <scroll-view scroll-y="true" class="text1">
<view class="text1_item" :style="{height:max>7?160+'rpx':''}"> <view class="text1_item" v-if="Attr_list" :style="{height:max>7?160+'rpx':''}">
<view class="text1_left"><text>Color</text> </view> <view class="text1_left"><text>Color</text> </view>
<view class="text1_right" ><text>{{ Attr_list }}</text></view> <view class="text1_right" ><text>{{ Attr_list }}</text></view>
</view> </view>
<view class="text1_item" > <!-- <view class="text1_item" >
<view class="text1_left" ><text>Power Suppy</text> </view> <view class="text1_left" ><text>Material</text> </view>
<view class="text1_right"><text>No</text></view> <view class="text1_right"><text>No</text></view>
</view> -->
<view class="text1_item" v-if="goodsDate.brand_name">
<view class="text1_left" ><text>Gender</text> </view>
<view class="text1_right"><text>{{ goodsDate.brand_name}}</text></view>
</view>
<view class="text1_item" v-if="goodsDate.goods_weight">
<view class="text1_left" ><text>Weight</text> </view>
<view class="text1_right"><text>{{ goodsDate.goods_weight}}</text></view>
</view> </view>
<view class="text1_item"> <view class="text1_item" v-for="(item,index) in goodsDate.property_list" :key="item.attr_name">
<view class="text1_left"><text>Type</text> </view> <view class="text1_left"><text>{{ item.attr_name }}</text> </view>
<view class="text1_right" v-if="goodsDate.cat_name" >{{ goodsDate.cat_name}}</view> <view class="text1_right" v-for="(item1,index1) in item.goods_attrs" :key="item1.attr_value">{{ item1.attr_value}}</view>
</view> </view>
<view class="text1_item"> <view class="text1_item" v-if="Size_list">
<view class="text1_left"><text>Length</text> </view> <view class="text1_left"><text>Length</text> </view>
<view class="text1_right" v-if="Size_list " >{{Size_list }}</view> <view class="text1_right" v-if="Size_list " >{{Size_list }}</view>
</view> </view>
@ -219,13 +231,13 @@
<text>Reviews({{goodsDate.comment_summary[0].commentcount}})</text> <text>Reviews({{goodsDate.comment_summary[0].commentcount}})</text>
</view> </view>
<view class="goods_title_right"> <view class="goods_title_right">
<image src="../../static/img/right.png" mode=""></image> <image src="../../static/icon/right_white.png" mode=""></image>
</view> </view>
</view> </view>
<view class="allReviews"> <view class="allReviews">
<text>{{goodsDate.comment_summary[0].commentcount==0?'0.0':'4.0'}}</text> <text>{{goodsDate.comment_summary[0].commentcount==0?'0.0':'4.0'}}</text>
<uni-rate size="25" :disabled="true" disabledColor="#B22234" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false"/> <uni-rate size="25" :disabled="true" disabledColor="#B22234" color="#B22234" :value="goodsDate.comment_summary[0].commentcount==0?'0':'4'" active-color="red" :is-fill="false"/>
</view> </view>
<template v-if="goodsDate.comment_summary[0].commentcount==0"> <template v-if="goodsDate.comment_summary[0].commentcount==0">
<view class="reviews_no">No comment yet</view> <view class="reviews_no">No comment yet</view>
@ -233,17 +245,25 @@
<template v-else> <template v-else>
<view class="reviews_item" v-for="(item,index) in commonlist" :key="index"> <view class="reviews_item" v-for="(item,index) in commonlist" :key="index">
<view class="reviews_item_title"> <view class="reviews_item_title">
<view class="reviews_title_user"> <view class="reviews_item_img"><image mode="" :src="item.avatar_img_small"></image></view>
<text>{{item.user_name}}</text> <view class="reviews_item_one">
<uni-rate style="margin-left: 16rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/> <view class="reviews_title_user">
<view class="reviews_title_user_name">{{item.user_name}}</view>
<uni-rate style="margin-left: 2rpx;margin-top: 10rpx;"size="18" :disabled="true" disabledColor="#B22234" :value="item.comment_rank" active-color="#B22234" :is-fill="false"/>
</view>
<!-- <view class="reviews_title_color">Color:###</view> -->
</view> </view>
<view class="reviews_title_time">{{item.add_time | date}}</view> <view class="reviews_title_time">{{item.add_time | date}}</view>
</view> </view>
<view class="reviews_item_color">{{item.commentlabels}}</view> <view class="reviews_item_color">{{item.commentlabels}}</view>
<view class="reviews_item_content">{{item.content}}</view> <view class="reviews_item_content">{{item.content}}</view>
<!-- <view class="reviews_item_image"> <view class="reviews_item_image">
<view class="reviews_image_content" v-for="(item,index) in 2" :key="index"></view> <view class="reviews_image_content" v-for="(item1,index1) in item.attachments" :key="item1.afile">
</view> --> <!-- <text> {{ item1.afile}}</text> -->
<image mode=" " :src="item1.afile"></image>
</view>
</view>
</view> </view>
</template> </template>
</view> </view>
@ -277,7 +297,7 @@
<view class="recommend_content_item_image"> <view class="recommend_content_item_image">
<image :src="item.thumb" mode=""></image> <image :src="item.thumb" mode=""></image>
</view> </view>
<text>{{item.short_name}}</text> <view class="recommend_content_name"><text>{{item.short_name}}</text></view>
<view class="recommend_content_item_pric">US${{item.is_promote==0? item.shop_price :item.promote_price}}</view> <view class="recommend_content_item_pric">US${{item.is_promote==0? item.shop_price :item.promote_price}}</view>
</view> </view>
</view> </view>
@ -329,9 +349,9 @@
<view class="color_select_item" v-for="(item1,index1) in item.list" :key="item1.attr_value" <view class="color_select_item" v-for="(item1,index1) in item.list" :key="item1.attr_value"
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> :class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom"> <view class="color_select_item_zoom">
<image src="/static/icon/big2.png" mode=""v-if="item1.attr_img!=''"></image> <image src="/static/icon/big2.png" @click="clickImg(index1)" mode=""v-if="item1.attr_img!=''"></image>
</view> </view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image> <image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''" ></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view>
</view> </view>
@ -348,12 +368,15 @@
<view class="select_size_item">M</view> <view class="select_size_item">M</view>
<view class="select_size_item">L</view> <view class="select_size_item">L</view>
</view> --> </view> -->
<view class="quantity">
<text>Quantity</text>
<uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view>
</scroll-view> </scroll-view>
<view class="quantity"> <!-- <view class="quantity">
<text>Quantity</text> <text>Quantity</text>
<uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box> <uni-number-box background="#FFFFFF" v-model="cartQuery.goods_number" :min="1"></uni-number-box>
</view> </view> -->
<button @click="addCart">ADD TO CART</button> <button @click="addCart">ADD TO CART</button>
</view> </view>
<!-- 分享 --> <!-- 分享 -->
@ -363,7 +386,7 @@
<image src="../../static/img/close1.png" mode="" @click="Isshare=false"></image> <image src="../../static/img/close1.png" mode="" @click="Isshare=false"></image>
</view> </view>
<view class="share_icon"> <view class="share_icon">
<view class="icon_item"><image src="../../static/img/facebook1.png" mode=""></image>Facebook</view> <view class="icon_item"><image src="../../static/img/facebook1.png" mode=""></image><view>Facebook</view></view>
<view class="icon_item" @click="Copylink()"><image src="../../static/img/copyLink.png" mode="">Copy Link</view> <view class="icon_item" @click="Copylink()"><image src="../../static/img/copyLink.png" mode="">Copy Link</view>
<view class="icon_item" @click="Sendmes()"><image src="../../static/img/Mes.png" mode="">Send SMS</view> <view class="icon_item" @click="Sendmes()"><image src="../../static/img/Mes.png" mode="">Send SMS</view>
<view class="icon_item" @click="downloadImg()"><image src="../../static/img/down.png" mode="">Download</view> <view class="icon_item" @click="downloadImg()"><image src="../../static/img/down.png" mode="">Download</view>
@ -762,7 +785,7 @@
defaultRequest(this.Ship).then( res => { defaultRequest(this.Ship).then( res => {
if(res.error == 0){ if(res.error == 0){
this.shipping_list = res.shipping_list this.shipping_list = res.shipping_list
//console.log(this.shipping_list,'1122') console.log(this.shipping_list,'1122')
} }
}) })
@ -788,7 +811,7 @@
} }
console.log(this.commonlist) console.log(this.commonlist,'11')
this.shop_price = this.goodsDate.shop_price this.shop_price = this.goodsDate.shop_price
this.goodsDate.gallery_list.map(item=>{ this.goodsDate.gallery_list.map(item=>{
item.content='' item.content=''
@ -939,7 +962,7 @@
if(e.e==2){ if(e.e==2){
this.isCart = true this.isCart = true
} }
console.info(this.shipping_list)
}, },
onShow(){ onShow(){
this.getCartNum() this.getCartNum()
@ -972,6 +995,10 @@
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.body{
background-color: #000;
color:white;
}
.bg_b{ .bg_b{
background-color: #000000; background-color: #000000;
} }
@ -1002,18 +1029,21 @@
.text1{ .text1{
width: 100%; width: 100%;
max-height:360rpx; max-height:500rpx;
min-height: 320rpx; min-height: 200rpx;
padding-left: 4.67rpx; padding-left: 4.67rpx;
padding-top: 30.67rpx; padding-top: 30.67rpx;
padding-bottom: 30.67rpx;
padding-right: 10rpx; padding-right: 10rpx;
// padding-right: 45.33rpx; // padding-right: 45.33rpx;
// line-height: 50rpx; // line-height: 50rpx;
// text-align: start; // text-align: start;
// font-size: 25rpx; // font-size: 25rpx;
// color: #999999; color: #999999;
&:last-child{
margin-bottom: 17.37rpx;
}
.text1_item{ .text1_item{
display: flex; display: flex;
width: 100%; width: 100%;
@ -1029,7 +1059,8 @@
width:200rpx; width:200rpx;
// background-color:red; // background-color:red;
height: 50rpx; height: 50rpx;
color:#999; color:#999;
font-size:28rpx; font-size:28rpx;
line-height: 50rpx; line-height: 50rpx;
text-align: start; text-align: start;
@ -1038,7 +1069,8 @@
} }
.text1_right{ .text1_right{
width:400rpx; width:400rpx;
color:#000; color:#000;
font-size:28rpx; font-size:28rpx;
// background-color:green; // background-color:green;
line-height:50rpx; line-height:50rpx;
@ -1065,23 +1097,25 @@
.securityDetails{ .securityDetails{
padding-top: 50.67rpx; padding-top: 20.67rpx;
// padding-bottom: 120rpx; // padding-bottom: 120rpx;
padding-left: 54.67rpx; padding-left: 54.67rpx;
padding-right: 45.33rpx; padding-right: 45.33rpx;
.securityDetails_item{ .securityDetails_item{
margin-bottom: 52rpx; margin-bottom: 22rpx;
font-size: 24.67rpx; font-size: 24.67rpx;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
// color: #fff;
&:last-child{ &:last-child{
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 50.67rpx; padding-bottom: 22.67rpx;
} }
.securityDetails_item_title{ .securityDetails_item_title{
position: relative; position: relative;
color: #333333; // color: #333333;
// color: #fff;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
margin-bottom: 10.33rpx; margin-bottom: 10.33rpx;
@ -1104,18 +1138,21 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.select_size_item{ .select_size_item{
background-color: #F8F8F8; // background-color: red;
min-width: 121.33rpx; width: 97.67rpx;
height: 54.67rpx; height: 97.67rpx;
display: flex; display: flex;
background-size: 100% !important;
background-repeat: no-repeat;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 12.67rpx; border-radius: 12.67rpx;
color: #666666; // color: #666666;
color: #fff;
font-size: 24rpx; font-size: 24rpx;
margin-right: 18.67rpx; margin-right: 18.67rpx;
border: 1px solid #F8F8F8; // border: 1px solid #F8F8F8;
padding: 0 10rpx; padding: 0 5rpx;
margin-bottom: 16.67rpx; margin-bottom: 16.67rpx;
// &:nth-child(-n+2){ // &:nth-child(-n+2){
@ -1133,6 +1170,7 @@
padding-right: 29.33rpx; padding-right: 29.33rpx;
box-sizing: border-box; box-sizing: border-box;
padding-top: 77.67rpx; padding-top: 77.67rpx;
color:#000;
width: 100%; width: 100%;
// font-size: 30.67rpx; // font-size: 30.67rpx;
font-weight: 400; font-weight: 400;
@ -1164,12 +1202,12 @@
} }
.addCard_body{ .addCard_body{
padding-right: 31.33rpx; padding-right: 31.33rpx;
max-height: 700rpx; max-height: 60vh;
min-height: 400rpx; min-height: 400rpx;
.addCard_price{ .addCard_price{
font-size: 44rpx; font-size: 44rpx;
font-weight: 500; font-weight: 500;
margin-top: 27.33rpx; margin-top: 17.33rpx;
margin-bottom: 51.33rpx; margin-bottom: 51.33rpx;
} }
.color_select{ .color_select{
@ -1217,7 +1255,7 @@
.active_color{ .active_color{
color: #B22234;; color: #B22234;;
background-color: white; background-color: white;
border: 1px solid #000000; // border: 1px solid #000000;
} }
} }
.variations_select_size{ .variations_select_size{
@ -1225,6 +1263,7 @@
margin-top: 26.67rpx; margin-top: 26.67rpx;
margin-bottom: 40.67rpx; margin-bottom: 40.67rpx;
.select_size_item{ .select_size_item{
background-size: cover;
margin-bottom: 16.67rpx !important; margin-bottom: 16.67rpx !important;
&:nth-child(4n+4){ &:nth-child(4n+4){
margin-right: 0; margin-right: 0;
@ -1266,7 +1305,7 @@
height: 73.33rpx; height: 73.33rpx;
line-height: 73.33rpx; line-height: 73.33rpx;
background-color: #191919; background-color: #191919;
color: white; color: white;
font-weight: bold; font-weight: bold;
font-size: 26.67rpx; font-size: 26.67rpx;
} }
@ -1275,26 +1314,32 @@
width: 100%; width: 100%;
margin-top: 36.67rpx; margin-top: 36.67rpx;
padding-bottom: 34rpx; padding-bottom: 34rpx;
border-bottom: 1px solid #E2E2E2; // border-bottom: 1px solid #E2E2E2;
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
background-color: transparent; // background-color: transparent;
} }
.spike1_item{ .spike1_item{
width: 410rpx; width: 480rpx;
background-color: #F6F6F6; background-color: #343434;
padding: 21.33rpx 24.67rpx; padding: 27.33rpx 37.67rpx;
margin-right: 19.33rpx; margin-right: 19.33rpx;
font-size: 20rpx; font-size: 20rpx;
// border:1rpx solid #ccc;
display: inline-block; display: inline-block;
color: #737373; // color: #737373;
color: #fff;
&:last-child{ &:last-child{
margin-right: 0; margin-right: 0;
} }
view{ view{
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.text_bold_200{
font-size: 24rpx;
font-weight: 50;
}
.spike1_item_title{ .spike1_item_title{
font-weight: bold; font-weight: bold;
@ -1311,7 +1356,8 @@
} }
} }
.spike1_item1{ .spike1_item1{
color: #191919; // color: #191919;
color: #fff;
font-size: 29.33rpx; font-size: 29.33rpx;
margin-right: 16.67rpx; margin-right: 16.67rpx;
width: 200rpx; width: 200rpx;
@ -1328,12 +1374,14 @@
margin-top: 22.67rpx; margin-top: 22.67rpx;
.spike1_item_text{ .spike1_item_text{
color: #9D9D9D; // color: #9D9D9D;
color: #fff;
font-size: 21.33rpx; font-size: 21.33rpx;
text-decoration: line-through; text-decoration: line-through;
} }
.spike1_item_text1{ .spike1_item_text1{
color: #9D9D9D; // color: #9D9D9D;
color: #fff;
font-size: 21.33rpx; font-size: 21.33rpx;
} }
} }
@ -1343,7 +1391,8 @@
font-weight: bold; font-weight: bold;
.spike1_item_text{ .spike1_item_text{
color: #000000; // color: #000000;
color: #fff;
font-size: 16rpx; font-size: 16rpx;
font-weight: 400; font-weight: 400;
margin-bottom: 20.67rpx; margin-bottom: 20.67rpx;
@ -1374,7 +1423,8 @@
} }
} }
.goods_title_right{ .goods_title_right{
color: #737373; // color: #737373;
color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 24rpx; font-size: 24rpx;
@ -1568,8 +1618,8 @@
.goods_info{ .goods_info{
padding: 0 26.67rpx; padding: 0 26.67rpx;
padding-top: 60.67rpx; padding-top: 60.67rpx;
padding-bottom: 35.33rpx; padding-bottom: 15.33rpx;
border-bottom: #F7F7F7 13.33rpx solid; // border-bottom: #F7F7F7 13.33rpx solid;
font-size: 30.67rpx; font-size: 30.67rpx;
font-weight: 400; font-weight: 400;
@ -1600,7 +1650,7 @@
align-items: center; align-items: center;
font-size: 24rpx; font-size: 24rpx;
padding-bottom: 33.33rpx; padding-bottom: 33.33rpx;
border-bottom: 1px solid #E2E2E2; // border-bottom: 1px solid #E2E2E2;
margin-bottom: 35.33rpx; margin-bottom: 35.33rpx;
.evaluate_text{ .evaluate_text{
font-weight: 500; font-weight: 500;
@ -1632,7 +1682,7 @@
width: 126.67rpx; width: 126.67rpx;
height: 126.67rpx; height: 126.67rpx;
margin-right: 9.33rpx; margin-right: 9.33rpx;
background-color: #999999; // background-color: #999999;
&:last-child{ &:last-child{
margin-right: 0; margin-right: 0;
@ -1687,7 +1737,7 @@
.transport{ .transport{
padding: 0 26.67rpx; padding: 0 26.67rpx;
padding-top: 37.33rpx; padding-top: 37.33rpx;
border-bottom: #F7F7F7 13.33rpx solid; // border-bottom: #F7F7F7 13.33rpx solid;
.title_Mtop{ .title_Mtop{
margin-top: 25.33rpx; margin-top: 25.33rpx;
@ -1696,7 +1746,7 @@
.security{ .security{
padding-top: 36rpx; padding-top: 36rpx;
padding-bottom: 32.67rpx; padding-bottom: 32.67rpx;
border-bottom: 1px solid #E2E2E2; // border-bottom: 1px solid #E2E2E2;
.security_content{ .security_content{
@ -1742,12 +1792,12 @@
} }
} }
.reviews{ .reviews{
border-bottom: #F7F7F7 13.33rpx solid; // border-bottom: #F7F7F7 13.33rpx solid;
padding: 0 26.67rpx; padding: 0 26.67rpx;
padding-top: 36rpx; padding-top: 36rpx;
.allReviews{ .allReviews{
background-color: #F7F7F7; background-color: #FFF;
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 26.67rpx; padding-left: 26.67rpx;
@ -1756,7 +1806,7 @@
font-weight: 800; font-weight: 800;
margin-top: 32.67rpx; margin-top: 32.67rpx;
height: 118.67rpx; height: 118.67rpx;
color:black;
text{ text{
display: inline-block; display: inline-block;
margin-right: 42rpx; margin-right: 42rpx;
@ -1773,8 +1823,10 @@
.productImage_image{ .productImage_image{
width: 100%; width: 100%;
min-height: 788rpx; min-height: 788rpx;
margin-bottom: 62rpx; margin-bottom: 0 !important;
// background-color: #999999; margin-top: 20rpx;
// margin-bottom: 62rpx;
background-color: #fff;
image{ image{
width: 100%; width: 100%;
@ -1800,7 +1852,8 @@
} }
} }
.footer{ .footer{
padding: 42rpx 0; padding-top:11rpx;
padding-bottom: 37rpx;
padding-left: 27.33rpx; padding-left: 27.33rpx;
padding-right: 19.33rpx; padding-right: 19.33rpx;
background-color: white; background-color: white;
@ -1818,6 +1871,7 @@
font-weight: bold; font-weight: bold;
display: flex; display: flex;
align-items: center; align-items: center;
color:#000;
} }
.footer_right{ .footer_right{
display: flex; display: flex;
@ -1844,7 +1898,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
color: white; color: #fff;
padding-left: 29.33rpx; padding-left: 29.33rpx;
padding-right: 22rpx; padding-right: 22rpx;
justify-content: space-between; justify-content: space-between;
@ -1882,21 +1936,22 @@
padding-left: 29.33rpx; padding-left: 29.33rpx;
padding-right: 29.33rpx; padding-right: 29.33rpx;
box-sizing: border-box; box-sizing: border-box;
padding-top: 37.67rpx; padding-top: 77.67rpx;
width: 100%; width: 100%;
font-size: 30.67rpx; font-size: 30.67rpx;
font-weight: 400; font-weight: 400;
padding-bottom: 44.67rpx; padding-bottom: 74.67rpx;
.order_popup_title{ .order_popup_title{
position: relative; position: relative;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #E2E2E2; border-bottom: 1px solid #E2E2E2;
display: flex; display: flex;
color:#000;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
// padding-top: 44.67rpx; // padding-top: 44.67rpx;
padding-bottom: 30.67rpx; padding-bottom: 50.67rpx;
text-align: center; text-align: center;
image{ image{
width: 21.33rpx; width: 21.33rpx;
@ -1915,16 +1970,21 @@
font-size: 20rpx; font-size: 20rpx;
line-height: 40rpx; line-height: 40rpx;
text-align: center; text-align: center;
.icon_one{
width: 100rpx;
height: 150rpx;
}
.icon_item{ .icon_item{
width: 100rpx; width: 100rpx;
height: 100rpx; height: 150rpx;
margin-top: 20rpx; margin-top: 20rpx;
color:#000;
margin-left: 20.37rpx; margin-left: 20.37rpx;
margin-right: 20.36rpx; margin-right: 20.36rpx;
// background-color: #B22234; background-color: #fff;
image{ image{
width: 100%; width: 100rpx;
height: 100%; height: 100rpx;
} }
} }
} }

96
pages/productDetails/review.vue

@ -29,8 +29,8 @@
<view class="review"> <view class="review">
<view class="review_title"> <view class="review_title">
<text>Score</text> <text>Score</text>
<uni-rate size="22" disabledColor="red" v-model="query.comment_rank" active-color="red" :is-fill="false" class="rate" v-if="reviewType==0"/> <uni-rate size="22" disabledColor="#B22234" v-model="query.comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-if="reviewType==0"/>
<uni-rate size="22" disabledColor="red" v-model="query1.comments[index].comment_rank" active-color="red" :is-fill="false" class="rate" v-else/> <uni-rate size="22" disabledColor="#B22234" v-model="query1.comments[index].comment_rank" active-color="#B22234" :is-fill="false" class="rate" v-else/>
</view> </view>
<view class="review_content"> <view class="review_content">
<image src="../../static/img/write.png" mode=""></image> <image src="../../static/img/write.png" mode=""></image>
@ -43,10 +43,13 @@
<image :src="VideoSrc" class="upload_item_camera" mode="" v-else></image> <image :src="VideoSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload the video</view> <view>Upload the video</view>
</view> </view>
<view class="reason_upload_item" @click="Upimg" > <view class="reason_upload_item" @click="Upimg()">
<image src="/static/img/camera.png" class="upload_item_camera" mode="" v-if="!imgSrc"></image> <image src="/static/img/camera.png" class="upload_item_camera" mode="" v-if="!imgSrc"></image>
<image :src="imgSrc" class="upload_item_camera" mode="" v-else></image> <image :src="imgSrc" class="upload_item_camera" mode="" v-else></image>
<view>Upload pictures</view>
<!-- <view>Upload pictures</view>
</view> </view>
<view class="reason_upload_item reason_upload_item1"> <view class="reason_upload_item reason_upload_item1">
@ -62,7 +65,11 @@
</template> </template>
<script> <script>
import {defaultRequest2,defaultRequest3} from '../../api/index.js' import {defaultRequest,defaultRequest2,defaultRequest3,defaultRequest5} from '../../api/index.js'
import { encryptDes, decryptDes ,encrypt_by_des } from '@/utils/des.js'
import Base64 from 'base-64';
import cryptoJS from "crypto-js"
import { pathToBase64 } from '@/js_sdk/mmmm-image-tools/index.js'
export default { export default {
data() { data() {
return { return {
@ -147,14 +154,91 @@
}) })
}, },
// upload(){
// console.log(1111)
// var input = documente.createElement('input');
// input.type = 'file';
// input.accept='image/*';
// this.$refs.input.$el.appendChild(input);
// input.onchange = (event) => {
// this.fileName = event.path[0].files[0].name;
// }
// $('input').click();
// },
// //
Upimg(){ Upimg(){
var that = this
let url
uni.chooseImage({ uni.chooseImage({
count: 6, //9 count: 3, //9
sizeType: ['original', 'compressed'], // sizeType: ['original', 'compressed'], //
sourceType: ['album'], // sourceType: ['album'], //
success: function (res) { success: function (res) {
console.info(res)
console.log(JSON.stringify(res.tempFilePaths)); console.log(JSON.stringify(res.tempFilePaths));
const tempFilePaths = res.tempFilePaths
console.log(res.tempFiles[0])
uni.getImageInfo({
src: res.tempFilePaths[0],
success: (path) => {
pathToBase64(path.path).then(base64 => {
// console.log(base64); // base64
url = base64
})
.catch(error => {
console.error(error)
})
}})
const json_data={
appcode:'DOPE+' ,//
appchannel:'FXXXXHUAWEI' ,//
appver: '1.0.0',//
appname:'cnic_buyer' ,//
manufacturer:'HUAWEI' ,//
phonebrand:'HORNOR' ,//
phonetype:'X30' ,//
phoneos:'ANDROID',//
_action:'uploadcommentfile',//
atype: 1,//
// afile:res.tempFiles[0]
}
//
let data = encryptDes(JSON.stringify(json_data),'6780f04cf2e211ec86a8005056c00008');
let file = encryptDes(JSON.stringify(res.tempFiles[0]),'6780f04cf2e211ec86a8005056c00008');
// let afile = {
// afile:file
// }
// console.log(afile)
// defaultRequest5(data,afile).then(res =>{
// console.log(res)
// })
// let str = {
// _action: 'uploadcommentfile',
// atype:1,
// }
// let _action = encryptDes(JSON.stringify('uploadcommentfile'),'6780f04cf2e211ec86a8005056c00008');
// let type = encryptDes(JSON.stringify(1),'6780f04cf2e211ec86a8005056c00008');
uni.uploadFile({
url: 'https://en.meixx.com/mapi/api_v2011.php',
filePath: tempFilePaths[0],
name: 'afile',
formData:{
'data':data
},
success: (uploadFileRes) => {
console.log(uploadFileRes);
let data=decryptDes(uploadFileRes.data,'6780f04cf2e211ec86a8005056c00008');
console.log(data);
}
});
} }
}); });
} }

97
pages/shippingCart/index.vue

@ -1,9 +1,9 @@
<template> <template>
<view> <view class="body">
<uni-nav-bar :statusBar="true" left-icon="left" title=" Cart" color="#000000" :fixed="true" @clickLeft="back"> <uni-nav-bar :statusBar="true" left-icon="left" title=" Cart" color="#fff" backgroundColor="#000" :fixed="true" @clickLeft="back">
<block slot="right"> <block slot="right">
<view class="nav_right"> <view class="nav_right">
<image src="../../static/img/delete1.png" mode="" @click="deleteCart"></image> <image src="../../static/img/delete_white.png" mode="" @click="deleteCart"></image>
</view> </view>
</block> </block>
</uni-nav-bar> </uni-nav-bar>
@ -16,11 +16,15 @@
</view> </view>
<template v-else> <template v-else>
<view class="cart_info"> <view class="cart_info" v-if="money>0">
<image src="/static/img/Shipped.png" mode=""></image> <image src="/static/img/Shipped.png" mode=""></image>
<view class="cart_title_content">Buy <text v-if="money==0||money>0" style="color:darkred">US${{ money }}</text>more to enjoy FREE STANDARD SHIPPING!</view> <view class="cart_title_content">Buy <text style="color:darkred">US${{ money }}</text>more to enjoy FREE STANDARD SHIPPING!</view>
<view class="cart_title_right" @click="gotAdd()">Add</view> <view class="cart_title_right" @click="gotAdd()">Add</view>
</view> </view>
<view class="cart_info" v-if="money == 0">
<image src="/static/img/Shipped.png" mode=""></image>
<view class="title_left">FREE SHIPPING</view>
</view>
<view class="cart"> <view class="cart">
<view class="cart_content"> <view class="cart_content">
<view class="good_info" v-for="(gitem,index) in inlist" :key="gitem.rec_id"> <view class="good_info" v-for="(gitem,index) in inlist" :key="gitem.rec_id">
@ -36,9 +40,12 @@
<view class="info_name">{{gitem.goods_name}}</view> <view class="info_name">{{gitem.goods_name}}</view>
<view class="left_info_bottom" v-if="gitem.goods_attr"> <view class="left_info_bottom" v-if="gitem.goods_attr">
<view class="info_lable"> <view class="info_lable">
<text>{{gitem.goods_attr}}</text> <view class="info_lable_text">{{gitem.goods_attr}}</view>
<!-- <image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image> -->
<view class="image-v"><image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image></view>
</view> </view>
<view class="image-v"><image src="/static/img/bottom.png" mode="" @click="ChangeAttr(gitem)"></image></view>
</view> </view>
<view class="left_info_bottom2" v-if="!gitem.goods_attr"></view> <view class="left_info_bottom2" v-if="!gitem.goods_attr"></view>
<view class="info_price"> <view class="info_price">
@ -167,7 +174,7 @@
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCahnge=false,goods_attr_list = []"></image> <image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCahnge=false,goods_attr_list = []"></image>
<!-- <view class="change_img"><image :src="Attr_img" mode=""></image></view> --> <!-- <view class="change_img"><image :src="Attr_img" mode=""></image></view> -->
<scroll-view class="spike1" scroll-x="true" > <scroll-view class="spike1" scroll-x="true" >
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image> <image :src="item.img_url" mode="" @click="clickImg(gallery_list,index)" class="addCard_scroll" v-for="(item,index) in gallery_list" ></image>
</scroll-view> </scroll-view>
<scroll-view class="addCard_body" scroll-y="true"> <scroll-view class="addCard_body" scroll-y="true">
<view >{{ goodsDate.goods_name}}</view> <view >{{ goodsDate.goods_name}}</view>
@ -179,7 +186,7 @@
:class="str_select[index].goods_attr_id==item1.goods_attr_id?'active_color':''" :class="str_select[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''"> <view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode=""></image> <image src="/static/icon/big2.png" mode="" @click="clickImg(item.list,index1)"></image>
</view> </view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image> <image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view>
@ -775,7 +782,33 @@
// } // }
// }) // })
// } // }
} },
//
clickImg(list,index) {
console.log(list)
let imglist = []
list.map( item =>{
if(item.img_url){
imglist.push(item.img_url)
}
else{
imglist.push(item.attr_img)
}
})
wx.previewImage({
urls: imglist, //httpurl
current: index, // http
indicator:'number',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
}, },
onLoad() { onLoad() {
@ -819,7 +852,7 @@
</script> </script>
<style> <style>
page { page {
background-color: #F6F5FA; /* background-color: #000; */
padding-bottom: 150rpx; padding-bottom: 150rpx;
} }
</style> </style>
@ -905,9 +938,22 @@
.cart_title_content { .cart_title_content {
width: 510.67rpx; width: 510.67rpx;
text-align: left;
line-height: 50rpx;
} }
.title_left{
width: 620rpx;
line-height: 50rpx;
height: 50rpx;
text-align: left;
// background-color: #B22234;
float: left !important;
padding: 0 !important;
}
.cart_title_right { .cart_title_right {
width: 100rpx;
text-align: left;
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; font-weight: bold;
} }
@ -981,10 +1027,10 @@
.left_info_bottom { .left_info_bottom {
color: #C4C4C4; color: #C4C4C4;
width: 250rpx; max-width: 280rpx;
display: flex; display: flex;
padding: 0 3rpx 10rpx; padding: 0 3rpx 10rpx 10rpx;
border: 1px solid #C4C4C4; // border: 1px solid #C4C4C4;
border-radius:25rpx; border-radius:25rpx;
margin-right: 10rpx; margin-right: 10rpx;
height: 30rpx; height: 30rpx;
@ -995,22 +1041,27 @@
.image-v{ .image-v{
height: 20rpx; height: 20rpx;
width: 20rpx; width: 20rpx;
margin-right: 10rpx;
float: right;
margin-bottom: 20rpx; margin-bottom: 20rpx;
image{ image{
height: 100%; height: 100%;
width: 100%; width: 100%;
margin-right: 6rpx;
} }
} }
.info_lable { .info_lable {
width: 200rpx; display: flex;
height: 40rpx; height: 40rpx;
// max-width: 200rpx; padding-left: 10rpx;
// background-color: #B22234; border: 1px solid #C4C4C4;
overflow: hidden; overflow: hidden;
border: none !important; // border: none !important;
.info_lable_text {
margin-right: -3rpx;
}
} }
} }
@ -1047,7 +1098,7 @@
} }
.footer { .footer {
padding: 42rpx 0; padding: 21rpx 0;
padding-left: 27.33rpx; padding-left: 27.33rpx;
padding-right: 19.33rpx; padding-right: 19.33rpx;
background-color: white; background-color: white;
@ -1171,7 +1222,7 @@
} }
.addCard_body{ .addCard_body{
padding-right: 31.33rpx; padding-right: 31.33rpx;
max-height: 600rpx; max-height: 60vh;
min-height: 400rpx; min-height: 400rpx;
.addCard_price{ .addCard_price{
font-size: 44rpx; font-size: 44rpx;

9
pages/specialTitle/index.vue

@ -1,6 +1,7 @@
<template> <template>
<view class="body"> <view class="body">
<uni-nav-bar left-icon="left" @clickLeft="back()" :title="title" /> <view class="one"></view>
<uni-nav-bar left-icon="left" @clickLeft="back()" backgroundColor="#000" color="#fff" :title="title" />
<view v-for="(item,index) in list " :key="item.zone_id"> <view v-for="(item,index) in list " :key="item.zone_id">
<view v-for="(item1,index1) in item.blocks " :key="item1.block_pic"> <view v-for="(item1,index1) in item.blocks " :key="item1.block_pic">
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}"> <view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':'200rpx'}">
@ -134,6 +135,10 @@
} }
} }
.body{ .body{
padding-top: 50.33rpx; .one{
height: 50rpx;
width: 100%;
background-color: #000;
}
} }
</style> </style>

BIN
static/icon/cat_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/icon/like_red.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
static/icon/right_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/icon/share_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/img/bottom1_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
static/img/delete_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/img/pets_nav_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

BIN
static/img/ptes_nav1_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/img/top_white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Loading…
Cancel
Save