---
# System prepended metadata

title: 交易所

---

# 交易所
## 前台

### 1. .quasar資料夾裡面的檔案用途協助說明

![](https://i.imgur.com/Db3FBN7.png)


---

### 2.src-capacitor 與 src-cordova 這兩個資料夾用途

![](https://i.imgur.com/TbTfj0m.png)


---

### 3.開發環境與正式環境設定差異
設定上有需要注意的地方請再協助補充說明
###### .env.dev
```javascript=
# API_ENDPOINT=https://console.btbbtb777.com/
# API_ENDPOINT=https://console.forfuns.net/
API_ENDPOINT=http://btb.dd/
VIP_SERVICE=https://direct.lc.chat/13103568/
CUSTOMER_SERVICE=https://direct.lc.chat/13103568/

BTB_SOCIAL_FACEBOOK=https://www.facebook.com/BtB.Exchange/?ref=pages_you_manage
BTB_SOCIAL_TELEGRAM=https://t.me/BTBcExchange
BTB_SOCIAL_LINE=https://page.line.me/?accountId=433kzqdi&openerPlatform=native&openerKey=talkroom%3Amessage#mst_challenge=IAw9QuG4MK49TkZs4GW4aJul48IQtKZWElmd4dC8ZOk
BTB_SOCIAL_YOUTUBE=https://www.youtube.com/channel/UCTEENQuMurF7geO9jeGmA_w/featured
BTB_SOCIAL_INSTAGRAM=https://www.instagram.com/btb.exchange/
BTB_SOCIAL_TWITTER=https://twitter.com/BITEBAO1


PUSHER_APP_KEY=735579846bd7ab5e4b0d
PUSHER_APP_CLUSTER=ap3

```
###### .env.production
```javascript=
API_ENDPOINT=http://console.btbbtb88.com/
VIP_SERVICE=https://direct.lc.chat/13103568/
CUSTOMER_SERVICE=https://direct.lc.chat/13103568/

BTB_SOCIAL_FACEBOOK=https://www.facebook.com/BtB.Exchange/?ref=pages_you_manage
BTB_SOCIAL_TELEGRAM=https://t.me/BTBcExchange
BTB_SOCIAL_LINE=https://page.line.me/?accountId=433kzqdi&openerPlatform=native&openerKey=talkroom%3Amessage#mst_challenge=IAw9QuG4MK49TkZs4GW4aJul48IQtKZWElmd4dC8ZOk
BTB_SOCIAL_YOUTUBE=https://www.youtube.com/channel/UCTEENQuMurF7geO9jeGmA_w/featured
BTB_SOCIAL_INSTAGRAM=https://www.instagram.com/btb.exchange/
BTB_SOCIAL_TWITTER=https://twitter.com/BITEBAO1


PUSHER_APP_KEY=735579846bd7ab5e4b0d
PUSHER_APP_CLUSTER=ap3
```


---
### 4. quasar.config.js 

是否類似Webpack
有哪些設定需要留意的請再協助補充說明


---
### 5. qusar.extensions.json 
檔案設定用意請再補充說明
```javascript=
{
  "@quasar/dotenv": {
    "env_development": ".env.dev",
    "env_production": ".env.production",
    "common_root_object": "none",
    "create_env_files": true,
    "add_env_to_gitignore": false
  },
  "qdecimal": {}
}
```

---

### 6. 前台API
請再詳細說明各API用途或提供相關使用文件
```javascript=
import request from 'src/http/request'
request.setPrefix('api/v1')

export default {
    // test usage
    sendNewOrderBroadcast: ()             => request.get('broadcast/order'),
    sendNewAnnounceBroadcast: ()          => request.get('broadcast/announce'),


    getPhonecode: ()                      => request.get('auth/phonecode'),
    logout: ()                            => request.get('auth/logout'),
    login: (param)                        => request.post('auth/login', param),
    register: (param)                     => request.post('auth/register', param),
    forget: (param)                       => request.post('auth/forget', param),
    sendCode: (param)                     => request.post('auth/send/code', param),

    getUser: ()                           => request.get('user'),
    getUserProfile: (userId)              => request.get(`user/${userId}`),
    getUserOrders: (userId, page)         => request.get(`user/${userId}/orders?page=${page}`),
    updatePassword: (param)               => request.patch('user/password', param),
    updateFishcode: (param)               => request.patch('user/fishcode', param),
    updateNickname: (param)               => request.put('user/nickname', param),
    updatePhone: (param)                  => request.put('user/phone', param),
    updateEmail: (param)                  => request.put('user/email', param),
    getLoginLog: (page)                   => request.get(`user/loginlog?page=${page}`),

    getReferStatistics: ()                => request.get('user/refer/statistics'),
    getReferCommission: (page)            => request.get(`user/refer/commission?page=${page}`),

    getG2A: ()                            => request.get('google2fa'),
    updateG2A: ()                         => request.put('google2fa'),

    getBank: ()                           => request.get('user/bank'),
    updateBank: (param)                   => request.patch('user/bank', param),
    uploadBankReceipt: (param)            => request.post('user/bank', param, true),

    getCoin: (type)                       => request.get(`coin?type=${type}`),  // 取得幣種: 法幣(0), 虛擬幣(1)
    getPaymentSupport: (currency)         => request.get(`coin/paymentsupport?currency_symbol=${currency}`),

    getUserCoin: ()                       => request.get('user/coin'),
    getUserCoinWallet: (param)            => request.get('user/coin/wallet', param),
    getWithdrawInfo: (param)              => request.get('user/coin/withdraw/info', param),
    withdraw: (param)                     => request.post('transaction', param),

    // 資產紀錄
    getTransaction: (param)               => request.get('transaction', param),
    getTransactionDetail: (id)            => request.get(`transaction/${id}`),

    // 偏好設定
    getUserSetting: ()                    => request.get('user/setting'),
    updateUserSetting: (id, param)        => request.patch(`user/setting/${id}`, param),

    getKyc: ()                            => request.get('user/kyc'),
    updateKycInfo: (param)                => request.put('user/kyc/info', param),
    updateKycIdentity: (param)            => request.post('user/kyc/identity', param, true),
    updateKycOther: (param)               => request.post('user/kyc/other', param, true),

    getReceiptway: ()                     => request.get('user/receiptway'),
    updateReceiptway: (param)             => request.put('user/receiptway', param),

    getVip: ()                            => request.get('vip'),
    getVipCommissions: (page)             => request.get(`user/vip/commission?page=${page}`),

    getUserReceiveInfo: (param)           => request.get('user/receive/info', param),
    getUserReceiveInfoById: (id)          => request.get(`user/receive/info/${id}`),
    createUserReceiveInfo: (param)        => request.post('user/receive/info', param, true),
    updateUserReceiveInfo: (id, param)    => request.post(`user/receive/info/${id}`, param, true),
    deleteUserReceiveInfo: (id)           => request.delete(`user/receive/info/${id}`),

    getMarket: (param)                    => request.get('market', param),
    getMarketById: (id)                   => request.get(`market/${id}`),

    getUserMarket: ()                     => request.get('user/market'),
    getSetting: ()                        => request.get('setting'),           // 取得交易時效
    getUserMarketInfo: ()                 => request.get('user/market/info'),  // 發布廣告所需資訊
    getUserMarketRate: (param)            => request.get('user/market/rate', param),
    createUserMarket: (param)             => request.post('user/market', param),
    updateUserMarket: (id, param)         => request.patch(`user/market/${id}`, param),
    updateUserMarketStatus: (id, param)   => request.patch(`user/market/${id}/status`, param),
    getUserMarketDetail: (id)             => request.get(`user/market/${id}`),
    deleteUserMarket: (id)                => request.delete(`user/market/${id}`),

    getMarketOrder: (param)               => request.get('market/order', param),
    getMarketOrderById: (id)              => request.get(`market/order/${id}`),
    createMarketOrder: (param)            => request.post(`market/order`, param),
    updateMarketOrder: (id, param)        => request.patch(`market/order/${id}`, param),
    updateOrderRating: (id, param)        => request.patch(`market/order/${id}/rating`, param),
    createMarketOrderAppeal: (id, param)  => request.post(`market/order/${id}/appeal`, param, true),
    sendOrderChat: (id, param)            => request.post(`market/order/${id}/chat`, param),
    getOrderChat: (id)                    => request.get(`market/order/${id}/chat`),

    getCarousel: ()                       => request.get('carousel'),

    getAnnounce: (page, queryStr)         => request.get(`announce?page=${page}${queryStr}`),
    getAnnounceDetail: (id)               => request.get(`announce/${id}`)

}


```


---
### 7. 若前台其他地方也要使用OTP驗證，是否需要由後端加開API


---

## 後台
### 1. 後台前後端分離架構
> 針對後台的前端架構，目前會使用到的資料夾與檔案，請協助補充說明

![](https://i.imgur.com/mKXniR6.png)

### 2. webpack.mix.js

此設定檔用途請協助說明
```javascript=
const mix = require("laravel-mix");
// const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');

function resolve(dir) {
    return path.join(__dirname, "/resources/vendor/laravue", dir);
}

Mix.listen("configReady", webpackConfig => {
    // Add "svg" to image loader test
    let imageLoaderConfig = webpackConfig.module.rules.find(
        rule =>
            String(rule.test) ===
            String(/(\.(png|jpe?g|gif|webp)$|^((?!font).)*\.svg$)/)
    );
    imageLoaderConfig.exclude = resolve("icons");
});

mix.webpackConfig({
    // plugins: [
    //     new HardSourceWebpackPlugin()
    // ],
    resolve: {
        extensions: [".js", ".vue", ".json"],
        alias: {
            vue$: "vue/dist/vue.esm.js",
            "@": __dirname + "/resources/vendor/laravue"
        }
    },
    module: {
        rules: [
            // {
            //    test: /\.(jpe?g|png|gif)$/,
            //    loader: 'url-loader'
            // },
            {
                test: /\.svg$/,
                loader: "svg-sprite-loader",
                include: [resolve("icons")],
                options: {
                    symbolId: "icon-[name]"
                }
            }
        ]
    }
});

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js("resources/vendor/laravue/app.js", "public/js")
    // .extract(['vue', 'axios', 'vuex', 'vue-router', 'vue-i18n', 'element-ui'])
    // .options({
    //     processCssUrls: false
    // })
    .sass("resources/vendor/laravue/styles/index.scss", "public/css");
// .copyDirectory('resources/material', 'public/material')

// mix.js('resources/vendor/deposite/app.js', 'public/js/deposite.js')

if (mix.inProduction()) {
    mix.version();
} else {
    // Development settings
    mix.sourceMaps().webpackConfig({
        devtool: "cheap-eval-source-map" // Fastest for development
    });
    mix.browserSync(process.env.MIX_BROWSERSYNC);
}

```


---

### 3.後台頁面商業邏輯
請再協助提供後台頁面功能說明與API使用文件

![](https://i.imgur.com/bsca8s4.png)

![](https://i.imgur.com/UlKUeoa.png)



---
### 4.後台前端部分頁面修改
後台頁面是否直接修改檔案
修改後是否需要重新編譯
